【简答题】【消耗次数:1】
结构体数组中存有3个人的姓名和年龄,以下程序输出3个人中最年长者的姓名和年龄,在横线上填上正确的内容。static struct man{ char name[20];int age;}person[]={{zhang-hua,18},{li-dong,20},{wang-ping,22}};main(){ struct man *p,*q;int old=0;for[填空1];[填空2];p++)if (oldage){ q=p;[填空3];}printf(%s%d,[填空4]);}
参考答案:
复制
纠错
➡️如需代学继续教育,联系微信:yizhituziang

相关题目
【简答题】 #includestdio.hint main(){int a[10]={0,1,2,3,4,5,6,7,8,9};int *p;p=a;printf(%d\n,*p);p++;printf(%d\n,*p);}程序输出结果为[填空1]和[填空2]。
【简答题】 int a[10]={0,1,2,3,4,5,6,7,8,9};int *p;int i;p=a;printf(%d\n,*p++);printf(%d\n,*++p);程序输出结果为[填空1]和[填空2]。
【简答题】 在以下嵌套结构中填空。#includestdio.hstruct date{ int month;int day;int year;};struct student{[填空1]name[20];[填空2]age;[填空3]sex;[填空4]date_birthday;[填空5]department[30];};
【单选题】 以下程序的运行结果是()。main(){inta[3]={1,2,3};int*num[3];int**p,i;for(i=0;ii++)num[i]=p=num;printf("%d",**p);}
①  1
②  3
③  a[0]
④  num
【简答题】 下面程序以每行4个数据的形式输出a数组。#define N 20 #include stdio.hvoid main() { int a[N],i;for(i=0; i i++) scanf(%d,[填空1]);for(i=0; i i++) { if([填空2]) [填空3]; printf(%3d,a[i]);}}
【单选题】 以下程序运行的输出结果是。main(){ int p=30;printf(%d\n,(p/320?p/10:p%3)); }
①  0
②  1
③  2
④  3
【简答题】 以下程序输入20个数,将其逆序输出。#includestdio.hvoid main() { int a[20],i; for(i=0;ii++) scanf(%d,[填空1]); for(i=19;ii--) printf(%d ,[填空2]); }
【多选题】 以下说法正确的是(  )。#include stdio.hint main(){struct student // 声明结构体类型struct student {int num;char name[20];float score;}student1;
①  student是变量名
②  student是类型名
③  student1是变量名
④  student1类型名
【单选题】 下述程序的运行结果( )。 #includevoid main() { int p,a=0; if(p=a!=0)printf(%d\n else printf(%d\n,p+2); }
①  1
②  2
③  3
④  5
【简答题】 #include stdio.hint main(){char a[]=I love China!,b[20],*p1,*p2;p1=a;p2=b; for(;*p1!=\0p1++,p2++)*p2=*p1; *p2=\0// printf(string a is:%s\n printf(string b is:%s\n return 0;}以上程序运行结果为string b is:[填空1]。
随机题目
【单选题】 一般一座大楼内的一个计算机网络系统,属于()
①  PAN
②  LAN
③  MAN
④  WAN
【单选题】 网络间的通信按一定的规则和约定进行,这些规则和约定称为()
①  配置
②  命令
③  异步传输
④  协议
【单选题】 微机系统与外部交换信息主要通过()
①  输入输出设备
②  键盘
③  光盘
④  内存
【单选题】 Word主窗口的标题栏最右边显示的按钮是()按钮。
①  最小化
②  还原
③  关闭
④  最大化
【单选题】 下列关于数据库说法不正确的是()。
①  数据共享性好
②  数据独立性高
③  数据冗余高
④  数据高度结构化
【单选题】 除()以外,其余都是按计算机网络覆盖的地理范围分类的网络。
①  局域网
②  校园网
③  广域网
④  城域网
【单选题】 OSI参考模型由7层组成,以下不属于的是()
①  物理层
②  数据链路层
③  网络层
④  拓扑层
【单选题】 程序的三种基本结构不包括()。
①  顺序结构
②  疑问结构
③  选择结构
④  循环结构
【单选题】 物联网的核心和基础是(),它是在互联网基础上延伸和扩展的网络
①  电脑
②  防火墙
③  互联网
④  服务器
【单选题】 为了解决CPU与主存的速度匹配问题,可采用()。
①  磁盘存储器
②  高速缓冲存储器
③  通用寄存器
④  光盘存储器