I just started my C programming class today and I am having a problem with the output on my terminal which the C doesn't print on it's own line.
我今天刚刚开始我的C编程课程,我的终端输出有问题,C不能在它自己的行上打印。
#include <stdio.h>
int main(){
printf("Hello World");
return 0;
}
}
1 个解决方案
#1
6
Use a newline character, represented as '\n'
. The slash is an escape character for a few special characters, such as tab '\t'
, and carriage return '\r'
.
使用换行符,表示为'\ n'。斜杠是一些特殊字符的转义字符,例如制表符'\ t'和回车符'\ r'。
printf("Hello World\n");
printf(“Hello World \ n”);
#1
6
Use a newline character, represented as '\n'
. The slash is an escape character for a few special characters, such as tab '\t'
, and carriage return '\r'
.
使用换行符,表示为'\ n'。斜杠是一些特殊字符的转义字符,例如制表符'\ t'和回车符'\ r'。
printf("Hello World\n");
printf(“Hello World \ n”);