C语言试卷
第821题
若有说明:typedef struct{int a;char c;}w;,则以下叙述正确的是()。
第822题
设有以下语句
typedef struct TT
{char c;int a[4]} CIN;则下面叙述中正确的是( )。
第823题
设有如下语句
typedef struct Date
{
int year;
int month;
int day;
} DATE;则以下叙述中错误的是()。
第824题
若有定义:
typedef int* T; T a[20];
则以下与上述定义中a类型完全相同的是()。
第825题
若有定义:
typedef int T[10]; T *a[20];
则与上述定义完全等价的说明语句是()。
第826题
有以下定义:
struct data
{ int i;char c;double d; } x;以下叙述中错误的是()。
第827题
设有定义:
struct complex
{int real,unreal;} data1={1,8},data2;则以下赋值语句中错误的是()。
第828题
设有定义:
struct{int n;float x;}s[2],m[2]={{10,2.8},{0,0.0}};则以下赋值语句中正确的是()。
第829题
有以下程序段
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的是()。
第830题
有以下定义和语句:
struct workers
{
int num;
char name[20];
char c;
struct
{
int day;
int month;
int year;
}s;
}st;ruct workers w,*pw;
pw=&w;能给w中year成员赋1980的语句是()。
第831题
设有如下定义:
struct{int n;char c;}a[2], *p=a;则以下错误引用结构体成员n的是()。
第832题
设有以下程序段:
struct MP3
{
char name[20];
char color;
float price;
}std,*ptr;
ptr=&std;要引用结构体变量std中的color成员,下列写法中错误的是()。
第833题
有如下定义:
struct
{
int num;
char name[10];
struct
{
int y;
int m;
int d;
}birth;
}s,*ps=&s;以下对内嵌结构体成员的引用形式错误的是()。
第834题
有以下程序:
#include<stdio.h>
struct S{int a;int *b;};
main()
{
int x1[] = {3,4},x2[] = {6,7};
struct S x[] = {1,x1,2,x2};
printf("%d,%d\n",*x[0].b,*x[1].b);
}程序的运行结果是()。
第835题
若有以下定义:
struct tt{char name[10];char sex;} aa={"aaaa",'F'},*p=&aa;则错误的语句是()。
第836题
有以下结构体说明、变量定义和赋值语句
struct STD
{
char name[10];
int age;
char sex;
}s[5],*ps;
ps = &s[0];则以下scanf函数调用语句有错误的是()。
第837题
有如下定义:
struct st
{
char name[12];
int age;
char sex;
}std[10], *p=std;以下语句错误的是()。
第838题
有如下程序:
struct person
{
char name[10];
char sex;
float weight;
}zhangsan, *ptr;
ptr=&zhangsan;若要从键盘读入姓名给结构体变量zhangsan的name成员,输入项错误的是()。
第839题
设有定义:
struct
{
char mark[12];
int num1;
double num2;
}t1,t2;若变量均已正确赋初值,则以下语句中错误的是()。
第840题
以下叙述中正确的是()。