更多“若有以下结构类型说明和变量定义,则变量a在内存中所占字节数是struct stud{ char num[6]; int s[ ”相关问题
  • 第1题:

    假定int类型变量占用4个字节,若有定义:int[] x = new int[] {1,2,3,4,5,6}; 则数组x在内存中所占字节数是()。

    A.4

    B.12

    C.24

    D.48


    24

  • 第2题:

    设有以下结构类型说明和变量定义: struct stud { long id[2];   double ave; } a, *p; 则变量a在内存所占字节数是 。


    typedef struct { int n; char c; } REC; REC t1,t2;

  • 第3题:

    设有以下结构类型说明和变量定义,则变量a在内存所占字节数是 __________ struct stud { char num[6]; int s[4]; double ave; } a;

    A.22

    B.18

    C.14

    D.28


    14;4

  • 第4题:

    4、设有以下结构类型说明和变量定义,则变量a在内存所占字节数是 __________ struct stud { char num[6]; int s[4]; double ave; } a;

    A.22

    B.18

    C.14

    D.28


    typedef struct {int n; char c;}REC; REC t1,t2;

  • 第5题:

    【单选题】设有以下结构类型说明和变量定义,则变量a在内存所占字节数是 struct stud { char num[6]; int s[4]; double ave; } a;

    A.22

    B.18

    C.14

    D.28


    B 本题考查结构体的相关知识,选项A中structREC后面不能有分号,C选项中typedefstructREC的后面也不能有分号,选项D中REC已经是结构体变量,不能当做结构体类型来使用。