首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
阅读下列程序,则程序的输出结果为【 】。 #include "stdio.h" struct ty { int data; char c; }; main() { struct ty a={30,′x′}; fun(a); pri
阅读下列程序,则程序的输出结果为【 】。 #include "stdio.h" struct ty { int data; char c; }; main() { struct ty a={30,′x′}; fun(a); pri
admin
2010-12-10
26
问题
阅读下列程序,则程序的输出结果为【 】。
#include "stdio.h"
struct ty
{ int data;
char c; };
main()
{ struct ty a={30,′x′};
fun(a);
printf("%d%c",a.data,a.c); }
fun(struct ty b)
{ b.data=20;
b.c=′y′; }
选项
答案
30x
解析
本题的参数传递属于值传递,所以被调用函数内不能改变调用函数中的数据。
转载请注明原文地址:https://kaotiyun.com/show/PGPp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
考生文件夹下有一个工程文件sjt5.vbp。运行程序后,从文件中读出数据,将其放入一个5×5的二维数组a中。请编写程序,找出数组a中每行的最大值及该值在行中的次序(列下标),并将所找到的结果分别保存到一维数组b、c中(a中第一行的最大值保存在b(1)中,最
在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程:PrivateSubCommand1_Click() DimS1AsString S1="ABCDEF" Text1.Text=L
(1)在考生文件夹下有一个工程文件sjt3.vbp,运行情况如图3.181所示。程序的功能是计算表达式的值:z=(x-2)!+(x-3)!+(x-4)!+…+(x-N)!其中的N和x值通过键盘分别输入到两个文本框Text1、Text2中。单击名称
以下叙述中错误的是( )。
在程序中要使用Array函数给数组arr赋初值,则以下数组变量定义语句中错误的是( )。
以下事件过程的功能是:从已存在于磁盘上的顺序文件Numl.txt中读取数据,计算读出数据的平方值,将该数据及其平方值存入新的顺序文件Num2.txt中。则在以下横线处合适的语句是()。PrivateSubForm_Click()
要清除已经在图片框Picture1中打印的字符串而不清除图片框中的图像,应使用语句()。
数列1,1,2,3,5,8,13,21,…的规律是从第一个数开始,每个数足它前面两个数之和。在考生目录下有一个工程文件sit5.vbp。窗体中已经给出了所有控件,如图2-87所示。请编写适当的事件过程实现以下功能:在Text1中输入整数40,单击“计算”按
随机试题
加入葡萄糖液内静滴可治疗高钾血症的药物
麻疹早期最有特殊意义的是
下列关于发票管理的叙述中,正确的是()。
根据下列材料回答问题。甲乙两队的二分球与三分球的平均命中率哪队最高?()
社会主义职业道德反映了()的统一。
李某到云南大理打工时与贾某相识,贾某要求李某帮忙带一样东西到昆明,李某表示同意。贾某于是把自己买的750克鸦片用塑料膜包成条状,使其减少鸦片气味,然后装入用毛巾缝的袋子里,让李某系在腰上带上火车。李某问是什么东西,贾某说:“别多问,带到就行了。”李某在携带
阅读材料回答以下问题。作为一套复杂、动态的监管系统,实名制的各个步骤环环相扣,相互影响。如果执行与监管不到位,就算制度设计得再周详,也会形同虚设。最近,周围不少朋友抱怨实名制成了“睁眼瞎”。有人上医院挂号,发现实名制下,号贩子依然猖獗,挂号依然难
下列关于购买力平价理论,表述不正确的是()
以下程序段(38)int x=-1; do {x=x*x;} while(! x);
一台交换机具有24个10/100Mbps全双工端口和2个1000Mbps全双工端口,如果所有端口都工作在全双工状态,那么该交换机总带宽为()。
最新回复
(
0
)