接下来的所有函数均包含在stdio.h文件中。
输出函数
前两个函数并不算重要。
puts()
puts()函数可以输出字符串、字符数组至标准输出流,一般而言是屏幕。函数执行完成后会自动在字符串尾添加换行符。
具体而言,可以:
puts("yo,man.");
printf("yo,man.\n");
char* hello = "yo,man.";
puts(hello);
putchar()
putchar()函数只能输出一个字符,并且不会自动在输出尾部添加换行符。
putchar('a');
char a = 'a';
putchar(a