正在加载图片...
123456789 while(s)0)[ printf(%ld,s%10); s/=10: 1 (2)mainO( X=3: do x- printf( %d" x); while(x>0); (3)# include“ stdio.h” void sub (int a) i static int x=3 printf(“%d%d”,x,y) maino sub(2); printf(“%d%d”,x,y) (4)# include“ stdio.h” mal i char a[40]=administrators",*p for (p=a: *p! ='s': p++)putchar(=*p-32) (5)# include“ stdio.h i char s[81]="SouthWest Jiao Tong University ", *p while(*p)I if(*p>=65&&*p<=97) put char(*p) (6)# include“ stdio.h int x=l, y=2 void sub ( int a) i static int x=2: printf(%d%d%d", x, y, a):x-- main (sub(3); printf(“%d”,x+y);sub(y-x); (7)# include“ stdio.h inta[4]={1,2,3,4} main I int *p=a, m, n; for(m =3; m>=0; m--) for(n=0; n<=m: n++) printf(%d,*(p+n) (8)# include“ stdio.h”{ long s=123456789; while(s>0) { printf(“%ld”,s%10);s/=10; } } (2) main(){ x=3; do x--;printf(“%d”,x);while(x>0); } (3) #include “stdio.h” int x=1,y=2; void sub(int a) { static int x=3; x++;y+=a; printf(“%d%d”,x,y); } main() { sub(2);printf(“%d%d”,x,y); } (4) #include “stdio.h” main() { char a[40]=”administrators”,*p; for(p=a;*p!=’s’;p++) putchar(*p-32); } (5) #include “stdio.h” main() { char s[81]=”SouthWest JiaoTong University.”,*p; p=s; while(*p) { if(*p>=65&&*p<=97) putchar(*p); p++; } } (6) #include “stdio.h” int x=1,y=2; void sub(int a) { static int x=2; printf(“%d%d%d”,x,y,a);x--; } main() { sub(3);printf(“%d”,x+y);sub(y-x); } (7) #include “stdio.h” int a[4]={ 1,2,3,4 }; main() { int *p=a,m,n; for(m=3;m>=0;m--) for(n=0;n<=m;n++) { printf(“%d”,*(p+n)); } (8) #include “stdio.h
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有