how to prevent reading the last newline character c code example Example: remove \n from string c strtok(Name, "\n");