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

选择章节

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

    年份:2022

    以下程序的输出结果为(  )
    #include
    #include
    main( )
    {struct person
    char name[20];
    int age;)
    struct person pers[10]={"xiaoming",17,"wanghua",19,"zhang",18};
    printf("%c",pers[1].name[o]);
    }(  )
    A.w B.x C.z D.a
  • 题型:选择题 题类:单元测试 难易度:难

    年份:2022

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

    年份: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

    程序运行输出结果是(  )
    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

    struct date{int x,y;}testl={10,20}test2;则以下赋值语句中错误的是(  )
    A.test2=testl; B.test2.x=testl.x; C.test2.x=testl.y; D.test2={30,40};
  • 题型:选择题 题类:单元测试 难易度:难

    年份: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 student
    {char no[8],name[10],sex[3];
    struct
    {int day,month,year;}birth;
    };
    struct student s;
    设变量s中的"生日"应是2005年8月18日,下列对"生日的赋值方式中正确的是(  )
    A.day =18;
    month=8;
    year=2005;
    B.s.day =18;
    s.month =8;
    s.year =2005;
    C.s.birth.day =18.
    s.birth.month=8;
    s.birth.year=2005;
    D.birth.day =18;