以下选项中不能正确把c1定义成结构体变量的是A.typedef struct {int red: int green: int blue; } COLOR; COLOR c1;B.struct color c1 {int red int green: int blue; };C.struct color {int red , int green : int blue : )cl;D.struct {int red; int green; int blue } c1 ;

题目

以下选项中不能正确把c1定义成结构体变量的是

A.typedef struct {int red: int green: int blue; } COLOR; COLOR c1;

B.struct color c1 {int red int green: int blue; };

C.struct color {int red , int green : int blue : )cl;

D.struct {int red; int green; int blue } c1 ;


相似考题
更多“以下选项中不能正确把c1定义成结构体变量的是A.typedef struct {int red: int green: int blue; ”相关问题
  • 第1题:

    以下选项中不能正确把cl定义成结构体变量的是()。

    A.typedef struct { int red; int green; int blue; } COLOR; COLOR cl;

    B.struct color cl { int red; int green; int blue; };

    C.struct color { int red; int green; int blue; }cl;

    D.struct { int red; int green; int blue; }c1;


    B

  • 第2题:

    【单选题】以下选项中不能正确把cl定义成结构体变量的是______。

    A.typedef struct {intred; int green; int blue; } COLOR; COLOR cl;

    B.struct color cl { int red; int green; int blue; };

    C.struct color { int red; int green; int blue; }cl;

    D.struct {int red; int green; intblue; }c1;


    B

  • 第3题:

    以下选项中不能正确把c1定义成结构体变量的是______。

    A.typedef struct { int red; int green; int blue; } COLOR; COLOR cl;

    B.struct color cl { int red; int green; int blue; };

    C.struct color { int red; int green; int blue; } c l;

    D.struct { int red; int green; int blue; } c l;


    struct color cl { int red; int green; int blue; };

  • 第4题:

    如下选项,哪个不是定义类型名tcolor________。

    A.enum tcolor{red, green, blue};

    B.typedef enum color{red,green,blue} tcolor;

    C.enum color {red,green,blue}; typedef enum color tcolor;

    D.typedef enum {red,green,blue} tcolor;


    错误

  • 第5题:

    9、以下选项中不能正确把c1定义成结构体变量的是______。

    A.typedef struct { int red; int green; int blue; } COLOR; COLOR cl;

    B.struct color { int red; int green; int blue; } c l;

    C.struct color cl { int red; int green; int blue; };

    D.struct { int red; int green; int blue; } c l;


    B 解析:结构体类型的定义格式为: stract结构体名 成员说明列表}; 结构体变量的定义有3种形式:第一种,定义结构体类型的同时定义结构体变量,如: street结构体名{成员说明列表}变量;第二种,先定义一个结构体类型,然后使用该类型来定义结构体变量,如:strect student{成员说明列表};student变量;第三种,定义一个无名称的结构体类型的同时定义结构体变量,如:strect student{成员说明列表}变量;。