首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
阅读下列程序,则程序的输出结果为【 】。 #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
20
问题
阅读下列程序,则程序的输出结果为【 】。
#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/TGPp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
软件按功能可以分为:应用软件、系统软件和支撑软件(或工具软件)。下面属于应用软件的是()。
数据库技术的根本目标是()。
下面4个选项中,不是窗体属性的是()。
考生文件夹下有一个工程文件sjt5.vbp。运行程序后,从文件中读出数据,将其放入一个5×5的二维数组a中。请编写程序,找出数组a中每行的最大值及该值在行中的次序(列下标),并将所找到的结果分别保存到一维数组b、c中(a中第一行的最大值保存在b(1)中,最
结构化程序的三种基本结构是()。
假定计时器控件Timer1的Enabled属性为True,Interval属性为1000,并编写如下程序代码:PrivateSubTimer1_Timer()DimxAsIntegerFori=1To100
有如下数据定义语句:DimX,YAsInteger以上语句表明()。
以下事件过程的功能是:从已存在于磁盘上的顺序文件Numl.txt中读取数据,计算读出数据的平方值,将该数据及其平方值存入新的顺序文件Num2.txt中。则在以下横线处合适的语句是()。PrivateSubForm_Click()
某二叉树有5个度为2的结点,则该二叉树中的叶子结点数是()。
随机试题
A.皮丘隆起,并出现红晕硬块,直径大于1cm,或红晕周围有伪足、痒感B.试验处皮肤明显突起的风团或大丘疹,周围充血或不充血C.皮丘红肿,硬结大于1.5cm,红晕可超过4cm,有时出现伪足,主诉痒感D.局部发红,直径大于1cm,有丘疹E.局部有红肿、
根据补充耕地数量质量按等级折算的技术指导意见,当补充耕地高于被占用耕地等级时,省级耕地占补平衡等级折算系数取值为()的数。
仅承受自重并将其传给基础的墙体,称为()。
招标人代理机构泄露应当保密的与招标投标活动有关情况和资料的,或与招标人、投标人串通损害国家利益、社会公共利益或者他人合法权益的,处()罚款。
针对建筑消防给水系统,室内消火栓给水系统采用的是()消防给水系统。
绝对真理和相对真理是()。
在我国,有权修改宪法的机关是()。
由于社会历史是由有意识有目的活动着的人创造的,因此
A、It’seasytoprepare.B、It’stastyandhealthful.C、It’sexoticinappearance.D、It’ssafetoeat.B根据“据爱吃昆虫的人所说,昆虫不仅高蛋白低脂肪,而且
A、Shehasnotimetostudy.B、Sheisshortofmoney.C、Shehaslosthermoney.D、Shehastolendmoneytoherfriend.B
最新回复
(
0
)