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;
举一反三
- 以下结构体定义错误的是 A: struct ord {int x; int y} struct ord a; B: struct ord {int x; int y} ; struct ord a; C: struct ord {int x; int y} a; D: struct {int x; int y} a;
- 下面结构体的定义语句中,正确的是( ) A: struct { int x; int y; int z;}ord;struct ord a; B: struct { int x; int y; int z;}ord;ord a; C: struct ord{ int x; int y; int z;};struct ord a; D: struct { int x, int y, int z;}a;
- 以下结构体的定义语句中,错误的是_____ A: struct ord{ int x; int y; int z;};struct ord a; B: struct ord{ int x; int y; int z;}struct ord a; C: struct ord{ int x; int y; int z;}a; D: struct{ int x; int y; int z;}a;
- 若有以下结构体,则正确的定义或引用是 struct Test int x; int y: v1; A: Test.x=10; B: Test v2;v2.x=10; C: struct v2;v2.x=10; D: struct Test v2=10;
- 设有定义:struct test{int x;int y} t;则下面的叙述不正确的是_________。
内容
- 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;