题目内容

程序输出结果为____。#include void f(int *a) { int i=0; while(*(a+i)<=11) { printf(“%d ”,*(a+i)); i++; } } int main() { int x[]={1,5,10,9,11,7}; f(x); }

查看答案
更多问题

以下程序段输出结果是____#include union myun{ struct { int x; int y; int z; } u; int k;} a;int main(){ a.u.x=4; a.u.y=5; a.u.z=6; a.k=12; printf("%d %d\n",a.u.x,a.u.z);}

以下程序输出结果是____#includestruct s { int a; float b; char *c; };int main(){ struct s x={19,83.5,"zhang"}; struct s *p=&x; printf("%d %.2f %c %s\n",x.a,(*p).b, *p->c, p->c); }

下面函数的功能是将两个字符串s1和s2连接起来,请填空使程序完整。void conj(char *s1,char *s2){ while (*s1)____; while (*s2) { *s1=____; s1++,s2++; } *s1=’\0’ ; }

结构数组中存有三人的姓名和年龄,以下程序输出三人中年龄最小者的姓名和年龄。请填空。struct man{ char name[20]; int age;}person[ ]={{“LiMing”,18},{“WangHua”,19},{“ZhangPing”,20;int main( ){ struct man *p,*q; int old=0; p=person; for( ; ; p++) if(old>p->age) { q=p; ;} printf(“%s %d”, q->name,q->age ); }

答案查题题库