Displaying a string with a string terminator in the middle : String Terminator « String « C Tutorial






#include <stdio.h>

int main(void)
{
  printf("The character \0 is used to terminate a string.");
  return 0;
}
The character








3.2.String Terminator
3.2.1.Displaying a string with a string terminator in the middle
3.2.2.Overwrite the newline character in string
3.2.3.By setting first[4] to NULL ('\0'), we can shorten the string