职教组卷基于海量职教高考试题库建立的在线组卷及学习系统
职教组卷
科目:

选择章节

  • 题型:选择题 题类:单元测试 难易度:难

    年份:2022

    以下程序的输出结果为(  )
    #include
    struct abc{ int a,b;}con[2]={{1,2},{3,4}};
    main( )
    {
    printf("%d",con[0].b/con[o].a*con[1].a);
    }(  )
    A.5 B.6 C.7 D.8
  • 题型:选择题 题类:单元测试 难易度:难

    年份:2022

    程序运行结果是(  )
    #include
    struct ord{int x,y;dt[2]={1,2,3,4};
    main( )
    { int m;
    m=dt[0].x*dt[1].x%dt[0].y;
    printf("%d",m);
    }(  )
    A.1 B.3 C.2 D.4
  • 题型:选择题 题类:单元测试 难易度:易

    年份:2022

    设有以下语句(  )
    typedef struct REC { char c;int a[4];};REC1;(  )
    A.可以用REC定义结构体变量 B.REC1是struct REC类型的变量 C.REC1是struct类型的变量 D.可以用REC1定义结构体变量
  • 题型:选择题 题类:单元测试 难易度:中档

    年份:2022

    以下关于结构体的叙述中,错误的是(  )
    A.结构体是一种可由用户构造的数据类型 B.结构体中的成员可以具有不同的数据类型 C.结构体中的成员不可以与结构体变量重名 D.可以在定义结构体变量的同时,对结构体变量进行初始化。
  • 题型:选择题 题类:单元测试 难易度:易

    年份:2022

    以下对结构体类型变量st的定义中,错误的是(  )
    A.struct{char c;int a;}st; B.struct ss{char c;int a;}st; C.typedef struct{char c;int a;}TT;TT st; D.struct{char c;int a;}TT;struct TT st;
  • 题型:选择题 题类:单元测试 难易度:难

    年份:2022

    程序运行输出结果是(  )
    struct abc
    { int a,b,c;
    };
    main( )
    {struct abc s[2]={{1,2,3},{4,5,6}};
    int t;
    t=s[0].a+s[1].b;
    printf("%d",t);
    }(  )
    A.5 B.6 C.7 D.8
  • 题型:选择题 题类:单元测试 难易度:难

    年份:2022

    下面程序的运行结果是(  )
    #include
    main( )
    {struct a{int x;int y;}b[2]={1,3,2,7};
    printf("%d",b[0].y/b[0].x*b[1].x);
    }(  )
    A.0 B.1 C.3 D.6
  • 题型:程序分析题 题类:单元测试 难易度:难

    年份:2022

    写出以下程序的输出结果。
    #include
    struct contry
    {int num;
    char name[20];
    }x[5]={1,"China",2,"USA",3,"Franc",4,"Englan",5,"Spanish");
    main( )
    {int i;
    for(i=3;i<5;i++)
    printf("%d%c",x[i].num,x[i].name[0]);
    }
  • 题型:程序分析题 题类:单元测试 难易度:难

    年份:2022

    写出以下程序的输出结果。
    #include
    #include
    typedef struct date
    { int mm,dd,yy;}DATE;
    main( )
    { DATE d1,d2;
    d1.mm=10;
    d1.dd=1;
    d1.yy=2021;
    d2=d1;
    printf("%d-%d-%d",d2.mm,d2.dd,d2.yy);
    }
  • 题型:选择题 题类:单元测试 难易度:易

    年份:2022

    有以下说明语句:
    struct ex
    {int x;float y;char z;}examplel;
    则下面的叙述中不正确的是(  )
    A.struct是结构体类型的关键字 B.examplel是结构体类型名 C.x.y.z都是结构体成员名 D.struct cx是结构体类型