首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
自考
#include<stdio.h> typedef struct abc {int a,b,c; }; main() {struct abe s[2]={{1,2,3),{4,5,6}}; int t=-s[
#include<stdio.h> typedef struct abc {int a,b,c; }; main() {struct abe s[2]={{1,2,3),{4,5,6}}; int t=-s[
admin
2010-04-24
23
问题
#include<stdio.h>
typedef struct abc
{int a,b,c;
};
main()
{struct abe s[2]={{1,2,3),{4,5,6}};
int t=-s[0].a+s[1].b;
printf("%d\n",t);
}
选项
答案
4
解析
#include<stdio.h>
typedef struct abc{
int a,b,C;
};/*定义一个结构体类型*/
main()
{struct abc s[2]={{1,2,3},{4,5,6}};/*定义一个结构体数组s[2]并赋初值*/
int t=-s[0].a+s[1].b;/*引用结构体数组元素的成员进行计算,计算t的值*/
printf("%d\n",t);
}
转载请注明原文地址:https://kaotiyun.com/show/1xAx777K
本试题收录于:
高级语言程序设计题库理工类分类
0
高级语言程序设计
理工类
相关试题推荐
设有如下程序流程图:根据表中的测试数据回答下面问题。(1)满足语句覆盖的最少测试组合是什么?
UML中的图形化工具可分为两类:一类是_________,用于表达系统或系统成分的静态结构模型;另一类是_________,用于表达系统或系统成分的动态结构模型。
一个用况图中,用况之间可以具有3种关系,不包括(-)
能力等级与成熟度等级存在________关系,两者都是一种过程改善路径。
如果某一个计算程序的输入值只有一个,其范围是[-2.0,2.0],现从输入的角度考虑一组测试用例:-2.001,-2.0,0,2.001。设计这组测试用例的方法是()
求向量D=A×(B+C),向量为浮点数,各向量元素个数均为N,参照CRAY-1方式分解为3条向量指令:①V3←存储器;访存取A送入V3寄存器组②V2←V0+K;B+C→K③V4←V2×V3;K×A→D当采用下列3种方式工作时,各需多
WAP移动终端上的浏览器所识别的描述语言不再是HTML或Javascript,而是无线标记语言WML和_______。
___________是指货币供给量是一个内生变量,则意味着货币供给量是经济体系内诸多因素共同作用的结果,中央银行难以有效控制货币供给量的多少,进而会影响到货币政策的效果。
一个运输问题的运价、产量、销量由表4.38给出,用最小元素法写出初始调运方案表。
随机变量X~N(1,4),求P{0<X≤1.6}.(已知(0.3)=0.6179,(0.5)=0.6915)
随机试题
具有羧基,能溶于碳酸氢钠溶液的化合物是
在压力容器焊补处遇到()的情况时,不能采用强度等级较低的焊条进行打底焊。
磁盘是计算机的存储器。()
细胞坏死的主要形态标志是
张某向王某借款5万元,还款期限为6个月,李某作为保证人,约定李某承担保证责任直至张某向王某还清本息为止,李某的保证责任期间如何计算()。
物业的所有权与物业的使用权相分离是物业管理社会化的必要前提,现代化大生产的社会专业分工则是实现物业管理社会化的必要条件。()
关于营运资金政策下列表述正确的是()。
灵活运用导游方法与技巧是保证导游活动顺利完成的重要条件,导游员在导游活动中应该遵循()原则。
我们对“市场经济体制”的认识,30年来先后经历了四个阶段:“计划经济为主,市场调节为辅”阶段、“有计划的商品经济”阶段、“计划经济与市场调节相结合”阶段、“建立社会主义市场经济体制”阶段。这一认识过程表明()。①每一时期的人们对客观事物的正确
platform—independentenvironment
最新回复
(
0
)