首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
若有以下程序段 struct st{ int n; struct st *next; }; struct st a[3]={ 5,&a[1],7,&a[2],9,’\0’ }, *p; p=&a[0]; 则以下选项中值为6的表达
若有以下程序段 struct st{ int n; struct st *next; }; struct st a[3]={ 5,&a[1],7,&a[2],9,’\0’ }, *p; p=&a[0]; 则以下选项中值为6的表达
admin
2021-04-28
25
问题
若有以下程序段
struct st{ int n; struct st *next; };
struct st a[3]={ 5,&a[1],7,&a[2],9,’\0’ }, *p;
p=&a[0];
则以下选项中值为6的表达式是
选项
A、p->n
B、(*p).n
C、p->n++
D、++(p->n)
答案
D
解析
本题考查结构体变量的引用,其中a为定义的结构体数组,D选项中p->n为5,++(p->n)为6,所以D选项正确。
转载请注明原文地址:https://jikaoti.com/ti/cnz0FFFM
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
有以下程序main(){inta=1,b=2;for(;a<8;a++){b+=a;a+=2;}printf("%d,%d\n",a,b);}程序运行后的输出结果是
以下叙述中正确的是
设有定义:charp[]={’1’,’2’,’3’),*q=p;以下不能计算出一个char型数据所占字节数的表达式是
公司的开发人员可以同时参加多个项目的开发,则实体开发人员和实体项目问的联系是
有以下程序#include<stdio.h>main(){inty=9;for(;y>0;y--)if(y%3==0)printf("%d",--y);}程序的运行结果是
若有以下程序#include<stdio.h>main(){inti,j=0;chara[]="Howareyou!",b[10];for(i=0;a[i];i++)if(a[i]==’’)b[j++]=a[i+1];b[j]=’\0’
软件是指
设有定义:inta=1,b=2,c=3;以下语句中执行效果与其它三个不同的是
设顺序表的长度为n。下列排序方法中,最坏情况下比较次数小于n(n-1)/2的是
一棵二叉树的前序遍历结果是ABCEDF,中序遍历结果是CBAEDF,则其后序遍历的结果是()。
随机试题
发生调节时,眼内哪些组织发生了形态和结构的改变
起重机吊装载荷是指()。
甲公司采用计划成本进行材料的日常核算。2008年12月,月初结存材料计划成本为200万元,成本差异为超支4万元;本月入库材料计划成本为800万元,成本差异为节约12万元;本月发出材料计划成本为600万元。假定甲公司按月末材料成本差异率分配本月发出材料应负
期货公司分支机构终止的,应当先行妥善处理公司债权债务,结清期货业务并终止经营活动。()
以下资料选自2009年7月中国建筑股份有限公司首次公开发行A股的发行公告。中国建筑首次公开发行不超过120亿股人民币普通股(A股)的申请已获中国证券监督管理委员会证监许可2009627号文核准。本次发行的保荐人是中国国际金融有限公司。本次发行采用
组团社委托接地社组织、落实旅游团活动的契约性文件、导游人员了解旅游团和接待社计划的主要依据是()
学校文化的功能主要体现在______、_____、_____和_____等四个方面。
被誉为中国现代毕异的科学家是()
数据库应用系统投入运行后,应用系统进入运行管理与维护阶段。设某学生管理系统在运行管理与维护阶段有如下工作:Ⅰ.定期检查数据文件的存储空间占用情况,并根据需要分配存储空间Ⅱ.分析数据库中各种操作,以发现潜在性能问题Ⅲ.将数据库中
A、Becauselearnersarecomplicatedandhardlyanalyzable.B、Becauselearnerstendtograspallthelearningstyles.C、Becausele
最新回复
(
0
)