/n和/t的用途?最好有实际举例谢

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 08:25:08
/n和/t的用途?最好有实际举例谢

/n和/t的用途?最好有实际举例谢
/n和/t的用途?最好有实际举例

/n和/t的用途?最好有实际举例谢
没有/n、/t什么的.
是\n和\t
\n表示换行(回车).
\t表示一个Tab字符(制表符).
比如在 printf("Hello, world!hehe"); 一句中,加上\n和\t的效果:
printf("Hello, world!hehe");
输出:
Hello, world!hehe
printf("Hello, world!\nhehe");
输出:
Hello, world!
hehe
printf("Hello, world!\thehe");
输出:
Hello, world! hehe