关于struct描述正确的是
A: struct不可以实现interface
B: struct可以包括无参数的默认构造函数
C: struct可以继承class
D: struct可以包括静态构造函数
A: struct不可以实现interface
B: struct可以包括无参数的默认构造函数
C: struct可以继承class
D: struct可以包括静态构造函数
D
举一反三
- 以下结构体类型可以用来构造链表的是? A: struct aa{int a; int *b;}; B: struct bb{int a; bb *b;}; C: struct cc{int *a; cc b;} ; D: struct dd{int *a; aa b;};
- 关于如下结构体struct node{ int id; struct node *next;};说法不正确的是 A: struct node为数据类型 B: struct node可以用于定义链表 C: 结构体标识符node可以省略 D: next 指向下一个结构体变量
- 关于如下结构体struct node{ int id; struct node next;};如下说法正确的是 A: node为数据类型 B: sizeof(struct node)的值为8 C: 此结构体定义存在错误 D: struct 可以省略
- 函数f()定义如下,该函数返回值的数据类型是______。 struct ABC int a;int b;int c;; struct ABC *f(struct ABC abc[2]) return (abc);
- 下述动态建立链表结点的标准C语法语句,( )是正确的 A: p = (struct LNode)malloc(sizeof(struct LNode)); B: p = (struct LNode *)malloc(sizeof(struct LNode *)); C: p = (struct LNode)malloc(sizeof(struct LNode *)); D: p = (struct LNode *) malloc(sizeof(struct LNode));
内容
- 0
设有以下定义: struct node { int data; struct node *next; }*p; 则以下的语句中正确的是()。 A: p=malloc(sizeof(struct node)) B: p=(struct node *)malloc(sizeof(struct node)) C: *p=(struct node *)malloc(4) D: p=(struct node )malloc(sizeof(struct node))
- 1
假设已构造好struct student数据类型; 则函数头void fun ( struct student stu[ ] ) 完全等价于void fun ( struct student *stu )
- 2
下面()数据类型是值类型。 A: class B: interface C: struct D: delegate
- 3
关于如下结构体说法正确的是struct node{ int id; struct node next;}; A: node为数据类型 B: next 指向下一个结构体变量 C: 此结构体定义存在错误 D: struct 可以省略
- 4
以下结构体定义错误的是 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;