• 2022-06-17
    关于struct描述正确的是
    A: struct不可以实现interface
    B: struct可以包括无参数的默认构造函数
    C: struct可以继承class
    D: struct可以包括静态构造函数
  • D

    内容

    • 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;