#include
#include
#include
#include
main()
{ char *p,*q,*r,
p=q=r=(char*)malioc(sizeof(char)*20);
strcpy(p,"attaboy,welcome!");
printf(”%c%c%c\n”,p[ 11 ], q[ 3 ],r[ 4 ]);
free(p);
}
查看答案
#include
main()
{ char *a[ ]={”ABC”,”DEFGH”,”IJ”,”KLMNOP”};
int i=0;
for(;i<4; i++) printf(”%s\n【 13 】 );
}
#include
main()
{ char *ch[4]={"red',"green","blue"};
int i=0;
while(ch[i] )
{ putchar(ch[i][0]); i++;)
}
#include
struct stu
{ int num; char name [10];int age;};
Void fun(struct stu *p)
{ printf("%s\n,p->name);}
main()
{ struct stu x[3]={ {01,”Zhang”,20},{02, ” Wang”,19},{03, ”zhao”,18} };
fun(x+2);
}
程序运行后的输出结果是
A. Zhang
B. Zhao
C. Wang
D. 19
#include
void exch(int t[ ])
{ t[0]=t[5]; }
main()
{ int x[10]={1,2,3,4,5,6,7,8,9,10),i=0;
while(i<=4){ exch(&x[i]); i++; }
for(i=0; 1<5;i++) printf(”%d",x[i]);.
printf("\n");
}
程序运行后输出的结果是
A. 2 4 6 8 10
B. 1 3 5 7 9
C. 1 2 3 4 5
D. 6 7 8 9 10