首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
自考
给定程序中,函数fun的功能是将形参std所指结构体数组中年龄最大者的数据作为函数值返回,并在rruun函数中输出。 #include typedef struct { char name[10]; int age; }
给定程序中,函数fun的功能是将形参std所指结构体数组中年龄最大者的数据作为函数值返回,并在rruun函数中输出。 #include typedef struct { char name[10]; int age; }
admin
2016-12-25
20
问题
给定程序中,函数fun的功能是将形参std所指结构体数组中年龄最大者的数据作为函数值返回,并在rruun函数中输出。
#include
typedef struct
{ char name[10];
int age;
} STD;
STD fun( STD std[],int n)
{ STD max,int i;
max=________; /*第一空*/
for(i=1;i
i(max.age<________)max=std
;/*第二空*/
retum max;
}
main()
{ STD std[5]={"aaa",17,"bbb",16,"ccc",18,"ddd",17,"eee",15};
STD max,
max=fun( std,5);
printf( "\n the result:\n");
printf( "\nName:% s,Age:% d\n",________,max.age); /*第三空*/
}
选项
答案
8td[0] 8td[i].age max.name
解析
转载请注明原文地址:https://kaotiyun.com/show/MjAx777K
本试题收录于:
高级语言程序设计题库理工类分类
0
高级语言程序设计
理工类
相关试题推荐
UML提供的图形化工具中,用于概念模型和软件模型动态结构的是()
RUP利用UML提供的术语和工具定义了需求获取层、系统分析层、_________、实现层,并给出了实现各层模型之间映射的基本活动以及相关的指导。
最易出现块冲突的Cache地址映像方式是()
在集中式主存的阵列处理机中,处理单元数为4,为了使4×4的二维数组A的各元素aij(i=0~3,j=0~3)在行、列、主/次对角线上均能实现无冲突访问,请问数组各元素在存储器各分体(分体号从0开始)中的分布情况(假设a00已存放在分体号为3,体内地址为0
设中断级屏蔽位“1”对应于开放,“0”对应于屏蔽,各级中断处理程序的中断级屏蔽位设置如题27表所示。如果所有的中断处理各需3个单位时间,中断响应和中断返回时间相对中断处理时间少得多。当计算机止在运行用户程序时,同时发生第2、3级中断请求,过两个单位时
编号为0,1,…,15的16个处理器,用单级互连网络互连,当用shuffle互连函数时,第9号处理器连至的处理器号数是()
如果你在编辑一个Word文稿时,需要输复杂的公式及表达式,而当前状态下又找不到公式编辑器,请说明应如何解决该问题。(假设该计算中安装的是Office2000软件)
以下关于DTE的叙述中,正确的是
关于VBScript脚本语言的变量,下面叙述正确的是 【】
输入100名学生的出生月份,统计并输出每个月份过生日的学生人数。#include<stdio.h>#defineN100voidmain(){inti,month;intbirth[13
随机试题
当血pH下降时,血液中离子化钙水平
A.IgAB.IgMC.IgGD.IgDE.Ig防止病原体从黏膜侵入的Ig是
肺卫不固之自汗证应选用的方药是( )。
行政复议的期限是当事人认为具体行政行为侵犯其合法权益之日起
从事爆破拆除工程的施工单位,必须持有工程所在地法定部门核发的(),承担相应等级的爆破拆除工程。
下列关于疏散出口检查内容的叙述中,错误的是()。
信用证规定到期日为2006年4月30日,而未规定最迟装运期,则可理解为______。()
你和老同志负责农民工创业新星的审核工作,你准备怎么做才能使这项工作保质保量地完成?
随着时代的进步,生态文明越来越得到国际社会的普遍认同,正如国外学者所指出的,“没有环境保护的繁荣是推迟执行的灾难”;不保护环境,经济就会陷入“增长的极限”;通过保护环境优化发展,经济则会有“无限的增长”。对“没有环境保护的繁荣是推迟执行的灾难”的准确理解是
报表记录分组是指报表设计时按选定的()值是否相等而将记录划分成组的过程。
最新回复
(
0
)