首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设有定义 #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
33
问题
设有定义
#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(){inta=2,b;b=a
以下叙述中错误的是
有以下程序main(){inti,j;for(i=1;i
耦合性和内聚性是对模块独立性度量的两个标准。下列叙述中正确的是
以下关于C语言数据类型使用的叙述中错误的是()。
以下叙述中正确的是
以下选项中,能用作数据常量的是()。
结构化程序所要求的基本结构不包括()。
随机试题
A、精囊B、睾丸C、附睾D、前列腺E、输精管精子成熟于
处方药
符合十二指肠溃疡疼痛特点的是()。
患儿,1岁,出生时接种过卡介苗,近2个月来经常低热、盗汗,OT试验(1:2000稀释液)硬结18cm,持续1周。应考虑该小儿为()。
以下关于宫殿外陈设的叙述,错误的是()
牙周病患者主诉症状通常为()。
简述强迫卖淫罪与组织卖淫罪的区别。
Eyesightplaysaveryimportantroleinourdailylife.Everywakingmoment,theeyesareworkingtoseetheworldaroundus.Ov
Averageincomewasconsiderablyhigheramongthegiftedpeople,especiallythemen,thanforthecountryasawhole,despitethe
Idon’tliketodisturbyou,becauseyou’requitetired______today.
最新回复
(
0
)