开发者

how to make the c compiler print \n

开发者 https://www.devze.com 2023-01-07 07:07 出处:网络
开发者_运维问答how to make the c compiler print \\n Assuming you mean the pair of characters, \\n, as opposed to a newline character:
开发者_运维问答

how to make the c compiler print \n


Assuming you mean the pair of characters, \n, as opposed to a newline character:

printf("\\n");


Depends what you need.

Either:

printf("\\n"); /* prints \n */

or:

printf("\n");  /* prints newline */


printf("\\n"); Escape sequence \\ represents \


How about

#error "\\n"


You can use \\n to print \n

printf( "\\n"  );

\n


putchar('\\');
putchar('n');


You can use escape char \ printf("\\n");

0

精彩评论

暂无评论...
验证码 换一张
取 消