We know a computer is a machine that processes data (stored in main memory) into information, under control of a stored program. We also know that, internally, a computer is a binary machine; thus the data and the program instruictions must be stored in binary form. Characters are represented in (71) . Numbers are stored as binary numbers, with each bit’s positional value significant. A computer’s main memory is divided into bytes, words or both (depending on the system), and each of these basic storage units is assigned an (72) . Using this address, the processor can read or write selected bytes or words.
The processor consists of a clock, an instruction control unit, an arithmetic and logic unit, and registers. Once a program is stored in main memory, the processor can begin to execute it. During (73) , the instruction control unit fetches an instruction from main memory; during (74) , the arithmetic and logic unit executes it. Precisely timed electronic pulses generated by the clock drive this basic (75)

(71)处填()。

A:a binary code B:words C:registers D:positional values

为了使程序的输出的正确结果为:
Now is 2004.7.10 10:10:10.
那么应在下列程序划线处填入的正确语句是( )。
那么应在下列程序划线处填入的正确语句是( )。
#include <iostream>
using namespace std;
class TIME;
class DATE

public:
DATE(int y=2004,int m=1,int d=1)

year=y;
month=m;
day=d;

friend void DateTime(DATE &d, TIME &t);
private:
int year, month, day;
;
class TIME

public:
TIME(iht h=0, int m=0,int s=0)

hour=h;
minute=m;
second=s;

friend void DateTime(DATE &d,TIME &t);
private:
int hour,minute, second;
;
______________________ //函数 DateTime 的首部

cout<<"Now is"<<d.year<<’.’<<d.month<<’.’<<d.day<<
’ ’<<t.hour<<":"<<t.minute<<’:’<<t.second<<’.’<<end1;

int main ( )

DATE d(2004,7,10);
TIME t(10, 10, 10);
DateTime(d,t);
return 0;

A:void DateTime(DATE &d,TIME &t) B:void TIME::DateTime(DATE &d,TIME &t) const C:friend void DateTime(DATE &d,TIME &t) D:void DATE::DateTime(DATE &d,TIME &t)

为使下列程序的正确输出结果为:
Now is 2004-7-6 12:12:12
那么应该在程序划线处填入的语句是( )。
#include <iostream>
using namespace std;
class TIME;
class DATE

public:
DATE(int y=2004,int m=1,int d=1)

year=y;
month=m;
day=d;

void DateTime(TIME &t);
private:
int year,month, day;
;
class TIME

public:
TIME(int h=0,int m=0,int s=0)

hour=h;
minute=m;
second=s;

______________; //将类 DATE 中成员函数 DateTime 声明为类 TIME 的友元函数
private:
int hour,minute, second;
;
void DATE: :DateTime(TIME &t)

cout<<"Now is "<<year<<’-’<<month<<’-’<<day<<
’ ’<<t.hour<<":"<<t.minute<<’: ’<<t.seoond<<’.’<<end1;

int main ( )

DATE d(2004,7,6);
TIME t (12, 12, 12);
d. DateTime (t);
return 0;

A:friend void DateTime(TIME &t); B:friend void DATE::DateTime(TIME &0; C:void DateTime(TIME &t); D:friend void DateTime(TIME &t);

Datetime是Data类型的变量,以下赋值语句中错误的是:______。

A:Datetime=# 4/14/97# B:Datetime=# September 1,1997# C:Datetime=#12:15:00 AM# D:Datetime=“8/8/99”

为了使程序的输出的正确结果为: Now is 2004.7.10 10:10:10. 那么应在下列程序划线处填入的正确语句是( )。 那么应在下列程序划线处填入的正确语句是( )。 #include <iostream> using namespace std; class TIME; class DATE { public: DATE(int y=2004,int m=1,int d=1) { year=y; month=m; day=d; } friend void DateTime(DATE &d, TIME &t); private: int year, month, day; }; class TIME { public: TIME(iht h=0, int m=0,int s=0) { hour=h; minute=m; second=s; } friend void DateTime(DATE &d,TIME &t); private: int hour,minute, second; }; ______________________ //函数 DateTime 的首部 { cout<<"Now is"<<d.year<<’.’<<d.month<<’.’<<d.day<< ’ ’<<t.hour<<":"<<t.minute<<’:’<<t.second<<’.’<<end1; } int main ( ) { DATE d(2004,7,10); TIME t(10, 10, 10); DateTime(d,t); return 0; }

A:void DateTime(DATE &d,TIME & B:void TIME::DateTime(DATE &d,TIME & const C:friend void DateTime(DATE &d,TIME & D:void DATE::DateTime(DATE &d,TIME &

为使下列程序的正确输出结果为: Now is 2004-7-6 12:12:12 那么应该在程序划线处填入的语句是( )。 #include <iostream> using namespace std; class TIME; class DATE { public: DATE(int y=2004,int m=1,int d=1) { year=y; month=m; day=d; } void DateTime(TIME &t); private: int year,month, day; }; class TIME { public: TIME(int h=0,int m=0,int s=0) { hour=h; minute=m; second=s; } ______________; //将类 DATE 中成员函数 DateTime 声明为类 TIME 的友元函数 private: int hour,minute, second; }; void DATE: :DateTime(TIME &t) { cout<<"Now is "<<year<<’-’<<month<<’-’<<day<< ’ ’<<t.hour<<":"<<t.minute<<’: ’<<t.seoond<<’.’<<end1; } int main ( ) { DATE d(2004,7,6); TIME t (12, 12, 12); d. DateTime (t); return 0; }

A:friend void DateTime(TIME &; B:friend void DATE::DateTime(TIME &0; C:void DateTime(TIME &; D:friend void DateTime(TIME &;

Datetime是Data类型的变量,以下赋值语句中错误的是:______。

A:Datetime=# 4/14/97# B:Datetime=# September 1,1997# C:Datetime=#12:15:00 AM# D:Datetime=“8/8/99”

Traversing a binary tree in preorder is equivalent to ().

A:Traversing the forest corresponding to the binary tree in root-first order. B:Traversing the forest corresponding to the binary tree in root-last order. C:Traversing the forest corresponding to the binary tree in breadth-first order. D:None of the above.

微信扫码获取答案解析
下载APP查看答案解析