newline in constant
A string constant cannot be continued on a second line unless you do the following:
Ending the first line with \n is not sufficient. For example:
printf("Hello, // error world"); printf("Hello,\n // error world"); printf("Hello,\ // OK world"); printf("Hello," // OK " world");
Spaces at the beginning of the next line after a line-continuation character are included in the string constant. None of the examples shown above embed a newline character into the string constant. You can embed a newline character as shown here:
printf("Hello,\n\ world"); printf("Hello,\ \nworld"); printf("Hello,\n" "world"); printf("Hello," "\nworld");