how to make the c compiler print \n
+14
A:
Assuming you mean the pair of characters, \n
, as opposed to a newline character:
printf("\\n");
Marcelo Cantos
2010-07-14 11:13:32
thanx friends ... all answers correct
subanki
2010-07-14 11:17:07
this place works like this :-) +1 for citing "escape sequence" the user should be aware of.
ShinTakezou
2010-07-14 12:15:19
+5
A:
Depends what you need.
Either:
printf("\\n"); /* prints \n */
or:
printf("\n"); /* prints newline */
Igor Oks
2010-07-14 11:15:02
still the user needs to know about escaping sequence... +1 because of alternative to printf.
ShinTakezou
2010-07-14 12:17:47