考点导航
[ 所有信息 ][ 单选题 ] 列表
  • 若有以下定义:
    struct tt{char name[10];char sex;} aa= {"aaaa",'F' },*p=&aa;
    则错误的语句是( )。
  • 有以下程序:
    #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);
    }
    程序的运行结果是( )。
  • 有如下定义:
    struct
    {
    int num;

    char name[10];
    struct
    {
    int y;
    int m;
    int d;
    }birth;
    }s,*ps=&s;
    以下对内嵌结构体成员的引用形式错误的是( )。
  • 设有以下程序段:
    struct MP3
    {
    char name[20];
    char color;
    float price;
    }std,*ptr;
    ptr=&std;
    要引用结构体变量std中的color成员,下列写法中错误的是( )。
  • 设有如下定义:
    struct{int n;char c;}a[2], *p=a;
    则以下错误引用结构体成员n的是( )。
  • 有以下定义和语句:
    struct workers
    {
    int num;
    char name[20];
    char c;
    struct
    {
    int day;

    int month;
    int year;
    }s;
    };
    struct workers w,*pw;
    pw=&w;
    能给w 中year成员赋1980的语句是( )。
  • 有以下程序段
    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的是( )。
  • 设有定义: struct{int n;float x;}s[2],m[2]= {{10,2.8},{0,0.0}};,则以 下赋值语句中正确的是( )。
  • 设有定义:
    struct complex
    {int real,unreal;} data1={1,8},data2;
    则以下赋值语句中错误的是( )。
  • 下面结构体的定义语句中,错误的是( )。
  • 有以下定义:
    struct data
    { int i;char c;double d; } x;
    以下叙述中错误的是( )。
  • 若有定义:
    typedef int T[10];
    T *a[20];
    则与上述定义完全等价的说明语句是( )。
  • 若有定义:
    typedef int* T;

    T a[20];
    则以下与上述定义中a类型完全相同的是( )。
  • 设有如下语句
    typedef struct Date
    {
    int year;
    int month;
    int day;
    } DATE;
    则以下叙述中错误的是( )。
  • 若有以下程序:
    typedef struct S
    {int g;char h;}T;
    以下叙述中正确的是( )。
  • 设有以下语句
    typedef struct TT
    {char c;int a[4]} CIN;
    则下面叙述中正确的是()。
  • 设有以下语句
    typedef struct TT
    {char c;int a[4]} CIN;
    则下面叙述中正确的是()。
  • 以下结构体类型说明和变量定义中正确的是( )。
  • 若有说明: typedef struct{int a;char c;}w;,则以下叙述正确的是 ( )。
  • 以下叙述中错误的是( )。