A green pillar lightbuoy,Fl(2) 5s,is to be substituted for the red conical lightbuoy Close

题目

A green pillar lightbuoy,Fl(2) 5s,is to be substituted for the red conical lightbuoy Close S.W.of the stranded wreck.The above sentence mainly refers to______.

A.a red buoy is to be replaced by a green buoy

B.a green buoy is to be replaced by a red buoy

C.either a red buoy or a green buoy is to be replaced

D.neither a red buy nor a green buoy is to be replaced

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

以下选项中不能正确把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 ;


正确答案:B
解析:本题考核的知识点是结构体类型定义。结构体类型的定义格式为:strcut结构体名{成虽说明列表};结构体变量的定义有3种形式:第一种,定义结构体型的同时定义结构体变量,如:strcut结构体名{成员说明列表}变量;选项C属于这种情况,故选项C正确:第二种,先定义一个结构体类型,然后使用该类型来定义结构体变量,如:strcutstudent{成员说明列表}:student变量;选项A属于这种情况,故选项A正确;第三种,定义一个无名称的结构体类型的同时定义结构体变量,如:strcutstudent{成员说明列表}变量;选项D属于这种情况,故选项D正确.所以,4个选项中选项B符合题意。

第2题:

以下选项中不能正确把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; } cl;


正确答案:B
解析:选项A)是把结构体类型改名后定义为变量cl。选项C),D)则是在定义结构体类型时定义变量,而选项B)不符合结构体类型定义的语法规则。

第3题:

设有说明var color:(red,green,yellow,blue);a:boolean;下面语句正确的是( )。

Aolor:=‘green‘;

Bwriteln(green);

Cwriteln(color);

Da:=color=red;


正确答案:D

第4题:

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

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

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

C.stmctcolor { int red, int green; int blue; }c1;

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


正确答案:D
解析:因为结构体中不能出现同名的成员变量,所以选项A和B都是错误的;又因为结构体中成员的定义应该由分号隔开,所以选项C也是错误的。选项D定义了一个无名结构体,并同时定义该结构体变量c1,是正确的写法。故应该选择D。

第5题:

WhichofthefollowingisthecorrectwiringorderforanRJ-11twolinejack?()

A.Black,Green,Red,Yellow

B.Black,Red,Green,Yellow

C.Red,Black,Green,Yellow

D.Yellow,Red,Green,Black


参考答案:B

第6题:

publicclassBall{publicenumColor{RED,GREEN,BLUE};publicvoidfoo(){//insertcodehere{System.out.println(c);}}}Whichcodeinsertedatline14causesthefoomethodtoprintRED,GREEN,andBLUE?()

A.for(Colorc:Color.values())

B.for(Colorc=RED;c<=BLUE;c++)

C.for(Colorc;c.hasNext();c.next())

D.for(Colorc=Color[0];c<=Color[2];c++)

E.for(Colorc=Color.RED;c<=Color.BLUE;c++)


参考答案:A

第7题:

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

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

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

C.struet color { int red; int green; int blue; }c1;

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


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

第8题:

Restricted areas at locks and dams are indicated by ______.

A.flashing red lights upstream and fixed red lights downstrem

B.yellow unlighted buoys

C.signs and / or flashing red lights

D.red daymarks upstream and green daymarks downstream


正确答案:C
船闸和水坝的限制区域用标志和/或闪红灯来表示。

第9题:

下列选项中不能正确定义结构体的是_______。

A.typedef struct

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

C.struct color

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


正确答案:B
解析:将一个变量定义为标准类型与定义为结构体类型不同之处在于:后者不仅要求指定变量为结构体类型,而且要求指定为某一特定的结构体类型(例如,struct color),不能只指定结构体名。其中可以不出现结构体名,答案D就是缺省结构体名的隋况。而变量名歹婊必须放在成员列表后面,所以B答案不能正确将cl定义为结构件变量。

第10题:

阅读下列说明和 C++代码,填补代码中的空缺,将解答填入答题纸的对应栏内。 【说明】 设计 RGB 方式表示颜色的调色板,进行绘图,其类图如图 5-1 所示。该程序的 C++代码附后。图5-1 类图

【C++代码】 include <iostream> include <stdlib.h> include <ctime> using namespace std; class MyColor{ private: int red; int green; int blue; public: MyColor() {red = 0; green = 0; blue = 0; } ~MyColor() { } MyColor(int red ,int green ,int blue) { this->red = red; this->green = green; this->blue = blue;} //其他方法略 void print() { cout<<"Red: " << red << "\tGreen: " << green << "\tBlue " << blue << endl; } }; class Palette ( private: int number; MyColor** palette; public: Palette() { number = 256; palette = (MyColor*)malloc (sizeof(MyColor ) *number); } ~Palette () { for (int i = 0; i < number; i++) { delete palette[i]; } (1) ; } Palette(MyColor** pale ,int number) { (2) = number; palette = (MyColor**)malloc(sizeof(MyColor*)*number) ; memcpy(palette ,pale ,sizeof(pale)*number); } //其他方法略 void print () { for (int i = 0; i < number; i++) { cout << i << " : " ; palette[i]->print(); } } }; class Drawing{ public: (3) int COLORNUMBER = 16; public: ~Drawing () { } void draw() ( Palette* palette; int red ,green ,blue; MyColor* color[COLORNUMBER); srand((unsigned)time(O)); for (int i = 0; i < COLORNUMBER; i++) red=rand ()% 256; green = rand() % 256; blue = rand ()% 256; color [i) = (4) (red ,green ,blue); } palette = new Palette(color ,COLORNUMBER); palette->print(); for (int i = 0; i < COLORNUMBER; i++) delete color[i]; } }; int main () { Drawing * d = (5) ; d->draw(); delete d; }


正确答案:(1) free(palette)
(2) this->number
(3) static const
(4) new MyColor
(5) new Drawing()

更多相关问题