There's no doubt that work has found its way into every hour of our day, thanks to beepers, cell phones and e-mail.

题目

There's no doubt that work has found its way into every hour of our day, thanks to beepers, cell phones and e-mail.


相似考题
更多“There's no doubt that work has found its way into every hour of our day, thanks t ”相关问题
  • 第1题:

    A: Whose dog is it? B: ( )our dog. ( )name is Rex.

    A. It's…It's

    B. Its… Its

    C. It's… Its


    答案: C

  • 第2题:

    下列哪一个静态字段表示一周中的第几天。

    A.HOUR_OF_DAY

    B.WEEK_OF_YEAR

    C.WEEK_OF_MONTH

    D.DAY_OF_WEEK


    DAY_OF_WEEK

  • 第3题:

    给定一个类及对象的定义,以下各选项中使用正确的是 。 class Time { private: int hour; int minute; public: int second; void set() {cin>>hour>>minute>>second;} void display() {cout<<hour<<minute<<second<<endl;} }t1, t2;

    A.t1.hour=10;

    B.t2.minute=20;

    C.t1.second=10;

    D.t1.set;


    A

  • 第4题:

    为了使程序的输出的正确结果为: 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)


    正确答案:A
    解析:本题程序中,分别在类DATE和TIME中将普通函数DateTime声明为友元函数,但该友元函数的定义是在类体外进行的。友元函数是一个普通函数,它虽然可以访问类对象的私有成员,但它毕竟不是类中的成员函数,因此在类体外定义友元函数时,不需要像成员函数一样在函数名前加上“类名::”。函数首部的其他定义照抄类中友元函数的声明。所以函数DateTime的首部为voidDateTime(DATE&d;TIME&t),即选项A。

  • 第5题:

    以下对象对其成员引用正确的是 。 class Time { public: int hour; int minute; void display() {cout<<hour<<minute<<endl;} }t1;

    A.hour.t1

    B.t1.hour

    C.t1.display

    D.display().t1


    使用类名可以直接调用其静态成员函数

  • 第6题:

    2、下列哪一个静态字段表示一周中的第几天。

    A.HOUR_OF_DAY

    B.WEEK_OF_YEAR

    C.WEEK_OF_MONTH

    D.DAY_OF_WEEK


    DAY_OF_WEEK