Linux编写C程序发现
Linux编写C程序发现
这几天我安装了一个Linux系统,想在里面学一下C语言的编写,发现在里面运行有一个好奇怪的现象:如下面
[cpp]
- #include<stdio.h>
- void mian(){
- printf("hello world!");
- }
输出没有结果!搞的我看了半天,程序没有错误啊!怎么这样!后来我把程序改为
[cpp]
- #include<stdio.h>
- void mian(){
- printf("hello world!/n");
- }
编译,运行,输出hello world!
我晕!原来是没有就加换行符!!谁知道为什么会这样啊??
评论暂时关闭