• 2022-06-04
    下面是关于结构类型与变量的定义语句,错误的是________。
    A: struct test{int a; int b; int c;}; struct test y;
    B: struct test{ int a; int b; int c;} struct test y;
    C: struct test{ int a; int b; int c;} y;
    D: struct { int a; int b; int c;} y;
  • B

    内容

    • 0

      以下定义错误的是(  )。 未知类型:{'options': ['struct c{ int x;\xa0 \xa0 \xa0 int y;}s;', 'struct\xa0{ int x;\xa0 \xa0 \xa0 int y;}s;', 'struct c s{ int x;\xa0 \xa0 \xa0 int y;};', 'struct c{ int x;\xa0 \xa0 \xa0 int y;};Struct c s;'], 'type': 102}

    • 1

      已有如下程序: public class Test{ public Test(int x,int y,int z){.....} } 下面哪些方法是合法的构造方法重载:( ) A: Test(){} B: int Test(){} C: Test(int x,int y,byte z){} D: void Test(int x,int y,int z){}

    • 2

      以下是"public static void test(int x, int y)"的方法重载( ) A: public static void Test(int x) B: public static int test(int x, int y) C: public static void test(int y, int x) D: public static void test(int x, int y)

    • 3

      下列对结构体类型变量定义不正确的是( ) A: struct teacher { int num; int age; }teach1; B: struct { int num; int age; }teach1,teach2; C: struct { int num; int age; }teacher; struct teacher teach1; D: struct teacher { int num; int age; }; struct teacher teach1;

    • 4

      中国大学MOOC: 若有以下结构体,则正确的定义或引用的是( )。struct Test{ int x;int y;} vl;