首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设有定义 #include <stdio.h> #include <stdlib.h> typedef struct{int x,y;}T; typedef struct{int x,y;} *USER; USER fun() {USER p;
设有定义 #include <stdio.h> #include <stdlib.h> typedef struct{int x,y;}T; typedef struct{int x,y;} *USER; USER fun() {USER p;
admin
2022-04-01
21
问题
设有定义
#include <stdio.h>
#include <stdlib.h>
typedef struct{int x,y;}T;
typedef struct{int x,y;} *USER;
USER fun()
{USER p;
p=(USER)malloc(sizeof(T));
p->x=1:
p->y=2;
return p;
}
函数fun返回值的类型是( )。
选项
A、T类型的结构体
B、指向结构体类型的指针
C、int类型的元素
D、int类型的指针
答案
B
解析
由题意可知:使用typedef将类型:struct{int x,y;}*重命名为USER,所以函数fun的返回类型为struct{int x,y;}*,即指向结构体类型的指针,本题答案为B。
转载请注明原文地址:https://kaotiyun.com/show/j2kp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
有以下程序#includeintfun(intA){intb=0;staticintc=3;a=(c++,b++);return(a);}main(){inta=2,i,k;for(i=0;
有以下程序#includemain(){charp[20]={’a’,’b’,’c’,’d’},q[]="abc",r[]="abcde";strcat(p,r);strcpy(p+str1en(q),q);
以下叙述中正确的是
以下叙述中正确的是()。
有以下程序,程序运行后的输出结果是main(){intm=1,n=2,*p=&m,*q=&n,*r;r=p;p=q;q=r;printf("%d,%d,%d,%d\n",m,n,*p,*q);}
若有以下函数首部intfun(doublex[10],int*n)则下面针对此函数的函数声明语句中正确的是
以下程序的输出结果是()。#includeintm=13;intfun(intx,inty){intm=2;retum(x*y-m);}main()
在快速排序法中,每经过一次数据交换(或移动)后()。
设有以下语句typedefstructTT{charc;inta[4];}CIN;则下面叙述中正确的是
有以下程序structA{inta;charb[10];doublec;};voidf(structAt);main(){structAa={1001,"ZhangDa",1098.0};f(a);printf("%d,%s,%6
随机试题
对胸部外伤的表述,正确的是
利多卡因作阻滞局麻时的常用浓度是
哪些情况下可以简易程序不可以一审终审()
压力表与表管之间装设三通旋塞阀的目的是()。
某企业在2011年终财务分析中发现人工成本比去年增加了5%,人力资源部对企业的各种人工费用进行了分析。根据以上资料,回答下列问题:分析发现自己企业福利开支占人工总成本比例过高,对此,下列说法不正确的有()。
企业购买或租用的生产要素所实际支付的货币支出是()。
下列哪些人可以提出宣告发明专利权全部无效的请求?
某篮球队主教练规定,如果一号上场,而且三号队员没有上场,那么,五号与七号队员中至少要有一人上场。如果主教练的规定被贯彻执行了,一号队员没有上场的充分条件是()。
基于构件的软件开发中,构件分类方法可以归纳为三大类:(35)________根据领域分析的结果将应用领域的概念按照从抽象到具体的顺序逐次分解为树形或有向无回路图结构;(36)________利用Facet描述构件执行的功能、被操作的数据、构件应用的语境或
Elderlypeoplerespondbesttoacalmandunhurriedenvironment.Thisisnotalwayseasyto【B1】______astheirbehaviorcansomet
最新回复
(
0
)