首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有以下程序段 struct st{int x;int*y;}*pt; int a[]={1,2},b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; 以下选项中表达式的值为11的是
有以下程序段 struct st{int x;int*y;}*pt; int a[]={1,2},b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; 以下选项中表达式的值为11的是
admin
2020-07-28
30
问题
有以下程序段
struct st{int x;int*y;}*pt;
int a[]={1,2},b[]={3,4};
struct st c[2]={10,a,20,b};
pt=c;
以下选项中表达式的值为11的是
选项
A、pt->x
B、*pt->y
C、++pt->x
D、(pt++)->x
答案
C
解析
由题目的已知条件可知,pt指向结构体数组c[2]的第一元素c[0],所以pt->x=10,执行自加运算后为11。
转载请注明原文地址:https://kaotiyun.com/show/A13p777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
给定程序中,函数fun的功能是将带头结点的单向链表逆置。即若原链表中从头至尾结点数据域依次为:2、4、6、8、10,逆置后,从头至尾结点数据域依次为:10、8、6、4、2。请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。
给定程序中已建立一个带有头结点的单向链表,链表中的各结点按结点数据域中的数据递增有序链接。函数fun的功能是:把形参x的值放入一个新结点并插入到链表中,插入后各结点数据域的值仍保持递增有序。请在程序的下划线处填入正确的内容并把下划线删除
函数fun的功能是:逆置数组元素中的值。例如:若a所指数组中的数据依次为:1、2、3、4、5、6、7、8、9,则逆置后依次为:9、8、7、6、5、4、3、2、1。形参n给出数组中数据的个数。请在程序的下划线处填入正确的内容并把下划线删除,使程序得
给定程序MODI1.C中函数fun的功能是:求出s所指字符串中最后一次出现的t所指子字符串的地址,通过函数值返回,在主函数中输出从此地址开始的字符串;若未找到,则函数值为NULL。例如,当字符串中的内容为“abcdabfabcdx”,t中的内容为
以下关于return语句的叙述中正确的是
有以下程序#include<stdio.h>intfun(inta,intb){if(b==0)returna;elsereturn(fun(--a,--b));}main(){printf("%d\n",
有以下程序#include<string.h>main(){charp[20]={’a’,’b’,’c’,’d’},q[]="abc",r[]="abcde";strcat(p,r);strcpy(p+strlen(q),q)
定义学生、教师和课程的关系模式:S(S#,Sn,Sd,Sa)(属性分别为学号、姓名、所在系、年龄);C(C#,Cn,P#)(属性分别为课程号、课程名、先修课);SC(S#,C#,G)(属性分别为学号、课程号和成绩)。则该关系为
有下列程序:main(){inti,t[][3]={9,8,7,6,5,4,3,2,1};for(i=0;i<3;i++)printf("%d",t[2-i][i]);}程序执行后的输出结果是
生产每种产品需要多种零件,则实体产品和零件间的联系是
随机试题
肺结核干酪样坏死转向愈合发生肾病综合征
在总图制图中,下列表示建筑物某点城市测量坐标的标注中()正确。
乙方能否就上述每项事件向甲方提出工期补偿和费用补偿要求?试简述其理由。该工程的实际施工天数为多少天?可得到的工期补偿为多少天?工期奖罚天数为多少天?
某混凝土工程,9月份计划工作量为5000m3,计划单价为400元/m3;而9月份已完成工作量为4000m3,实际单价为410元/m3,则该工程9月份的进度偏差为()万元。
根据现行消费税政策,关于消费税征税范围的说法,不正确的是()。
假设今天你参加招警面试时碰巧有一位考官曾是你的老师,并且他对你的评价一直不是很好,这对你的面试会有影响吗?
下列关于行政机关委托的组织的说法中正确的有()。
Writeanessayof160-200wordsbasedonthefollowingdrawing.Inyouressay,youshould1)describethedrawingbriefly,2)expl
Almosteveryfamilybuysatleastonecopyofanewspapereveryday.Somepeoplesubscribe(订阅)toasmanyastwoorthreenewspap
Intechnologymarkets,playingcatch-upisabruising,costlyandoften【B1】______game,evenforcorporategiants.Inamemo
最新回复
(
0
)