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

选择章节

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

    年份:2022

    struct date
    { int year;int month;int day;)
    struct S
    {struct date birthday;char name [20];
    }x[4]={{2008,10,1,”guangzhou"},
    {2009,12,25,"Tianjin"}};
    语句
    printf("%s,%d,%d,%d”,x[0].name,x
    [1].birthday.year);的输出结果为(  )
    A.guangzhou,2009 B.guangzhou,2008 C.Tianjin,2008. D.Tianjin,2009
  • 题型:选择题 题类:单元测试 难易度:中档

    年份:2022

    以下程序运行结果是(  )
    #include
    #include
    struct stl
    { float a;int b[5];c;
    main( )
    {printf("%d,%d,%d\n",sizeof (c.a),sizeof(c.b),sizeof(c));}(  )
    A.4,20,24 B.4,20,24 C.8,20,28 D.8,10,18
  • 题型:程序分析题 题类:单元测试 难易度:易

    年份:2022

    以下程序用来输出结构体变量tt所占存储单
    元的字节数,试填空。
    #include
    #include
    struct ss
    { char name[10];float ave;
    };
    main( )
    {struct ss tt;
    printf("ex size:%d\n",sizeof(______))
    }
  • 题型:程序分析题 题类:单元测试 难易度:中档

    年份:2022

    分析以下程序的运行结果。
    #include
    #include
    struct stu
    {char name[20];float score;}aa;
    main( )
    { printf("%d,%d,%d",sizeof(aa.name),sizeof(aa.score),sizeof(aa));}
  • 题型:选择题 题类:单元测试 难易度:中档

    年份:2022

    struct date
    { int year;int month;int day;}
    struct S
    { struct date birthday;char name [20];
    }x[4]={{2008,10,1,”guangzhou"},
    {2009,12,25,"Tianjin"}};
    语句
    printf("%s,%d”,x[0].name,x[1].birthday.year);的输出结果为(  )
    A.guangzhou,2009 B.guangzhou,2008 C.Tianjin,2008. D.Tianjin,2009
  • 题型:选择题 题类:单元测试 难易度:中档

    年份:2022

    struct{
    int num;
    char name[10];
    }x[3]={l,"china",2,"USA",3,"England"};
    语句printf("n%d,%s",x[1].num,x[2].name)的输出结果为(  )
    A.2,USA B.3,England C.1,china D.2,England
  • 题型:选择题 题类:单元测试 难易度:中档

    年份:2022

    struct xyz
    {int a;char c;}d1={1,’a’};若定义d2并赋值6,’k’,以下语句正确的是(  )
    A.struct xyz d2=(6,’k’); B.xyz d2=(6,’k’); C.struct d2=(6,’k’); D.d2={6,’k’};
  • 题型:程序分析题 题类:单元测试 难易度:中档

    年份:2022

    有以下程序
    # include
    include
    main( )
    { struct xyz
    { int a;
    char c;
    }d1={1,’c’};
    struct xyz d2=(5,’y’ }
    printf("%d,%c\n",d1.a,d1.c);
    printf("%d,%c\n",d2.a,d2.c);
    }
    写出程序运行后的输出结果。
  • 题型:程序分析题 题类:单元测试 难易度:易

    年份:2022

    有以下程序
    #include
    #include
    struct date
    { int mm dd,yy;}dl,d2;
    main( )
    {
    d1.mm=12;
    d1.dd=1;
    d1.yy=2021;
    d2=d1;
    printf ("%d-%d-%d\n",d2.mm,d2.dd,d2.yy);
    getch();
    }
    写出程序运行后的输出结果
  • 题型:程序分析题 题类:单元测试 难易度:中档

    年份:2022

    有以下程序
    include
    #include
    main( )
    { typedef struct student
    { char no[20];char name[10];char sex[3];int score;}STU;
    STU stul[50]={{"20210122","张三","男",678}};
    printf(“学号:%s姓名:%s性别:%s成绩:%s“,stu[0].no,stu[0].name,stu[0].
    sex,stuL0.score);
    }
    写出程序运行后的输出结果