使用“typedef int Integer;”语句把Integer定义为一个()。
A.整数变量
B.整数类型
C.数组变量
D.数组类型
A.整数变量
B.整数类型
C.数组变量
D.数组类型
第3题
以下选项中不能正确把cl定义成结构体变量的是( )。
(A)typedef struct
{ int red;
intgreen;
int blue;
)COLOR;
COLOR cl:
(B)struct color cl
{int red;
intgreen;
int blue;
};
(C)stmct color
{int red;
int green;
int blue;
}cl;
(D)struct
{int red;
int green;
int blue;
}cl;
第4题
若STUDENT student1,student2;(student1,student2为结构体变量)为正确定义,那么在此之前应做( )定义。
(A)struct
{char name[20];
int num;
}STUDENT;
(B)struct STUDENT
{char name[20];
int num;
};
(C)typedef struct
{char name[20];
int num;
}STUDENT;
(D)typedef struct STUDENT
{char name[20];
int num;
};
第5题
双端队列(duque)是一个可以在任一端进行插入和删除的线性表。现采用一个一维数组作为双端队列的数据存储结构,使用c语言描述如下: deftne maxsize 32{数组中可容纳的元素个数} typedef struct { datatype elem[maxsize]; int endl,end2; }duque; 试编写两个算法add(duque QU,datatype x,int tag)和delete(duque QU,datatype&x,int tag)用以在此双端队列的任一端进行插入和删除。当tag=0时在左端endl端操作,当tag=1时在右端end2端操作。
第6题
设有以下说明语句
typedef struct
{ int n;
char ch[8];
}PER;
则下面叙述中正确的是( )。
A.PER是结构体变量名
B.PER是结构体类型名
C.typedef struct是结构体类型
D.struct是结构体类型名
第7题
A.P是int型变量
B.P是基类型为int的指针变量
C.q是基类型为int的指针变量
D.程序中可用INTEGER代替int类型名
第8题
A.以上的说明形式非法
B.ST是一个结构体类型
C.NEW是一个结构体类型
D.NEW是一个结构体变量
第9题
A.p是指向struct node结构变量的指针的指针
B.NODE p;语句出错
C.p是指向struct node结构变量的指针
D.p是struct node结构变量
第10题
A.A.STD tt[2]={{1,'A',62},{2,'B',75}};
B.B.STD tt[2]={1,"A",62},2,"B",75};
C.C.struct tt[2]={{1,'A'},{2,'B'}};
D.D.struct tt[2]={{1,"A",62.5},{2,"B",75.0}};
第11题
A.A.可用S定义结构体变量
B.B.可以用T定义结构体变量
C.C.S是struct类型的变量
D.D.T是struct S类型的变量