看到我有下面的代码
#include<stdio.h>
int main ( int argc, char *argv[] )
{
int i=0;
for(i=1;i<argc-1;i++)
printf(" %s \n",argv[i]);
return 0;
}
编译运行如下
gcc test.c
./a.out 1 * 2
现在它的 o/p 伤痕累累..!
o/p 是:
1
a.out
Desktop
Documents
Downloads
ipmsg.log
linux-fusion-3.2.6
Music
Pictures
Public
Templates
test.c