niusouti.com
更多“(b) Calculate the value of the closing stocks of finished goods at the end of the three-mo ”相关问题
  • 第1题:

    It took me three hours _______ the task.

    A、finishing

    B、to finish

    C、finish

    D、finished


    参考答案:B

  • 第2题:

    下面程序的运行结果为【】。 include void main() {unsigned char value=127;int tota

    下面程序的运行结果为【 】。

    include <iostream.h>

    void main()

    {

    unsigned char value=127;

    int total=100;

    value++;

    total+=value;

    cout<<total<<end1;

    }

    A) 227 B) 100 C) 127 D) 27


    正确答案:4 10
    4 10 解析:本题主要考察C++类中静态数据成员的使用。程序首先定义了类 count,其内部含有private类型数据成员static int n;同时含有public类型构造函数 count()和静态成员函数static inttest(),这两个函数的功能分别是为对象申请系统资源并将静态数据成员n加1和将静态数据成员n加4。主函数前,程序将静态数据成员n初始化为0,该数据成员为所有类count的对象所共有的数据成员;主函数中程序首先执行静态成员函数test()(由于test声明为static,因此其调用时无需通过具体对象),其执行过程中,静态数据成员n应该加4变成n=4,因此此处输出为4;此后程序创建对象c1和c2,由于在每次创建过程中都要调用构造函数count(),而每次调用count()函数后,静态数据成员n值都会加1。因此,创建两个对象之后,n值变为n=6;再次执行test()函数后,n的值再次加4,因此变为n=6+4=10。故程序全部执行后,变量n值变为10,而中间程序输出为“410”。

  • 第3题:

    The boy lay in the street,his eyes_______and his hands______.

    A.closing;trembling
    B.closed;trembled
    C.closing;trembled
    D.closed;trembling

    答案:D
    解析:

  • 第4题:

    Youexecutedthefollowingcode:BEGINDBMS_SCHEDULER.SET_ATTRIBUTE(NAME=>’JOB_A’,ATTRIBUTE=>’JOB_PRIORITY’,VALUE=>7);END;/Afteranalyzingtheabovecode,whatconclusionwillyoudraw?()

    A.Thecodewillbeexecutedsuccessfully.

    B.ThecodewillnotbeexecutedsuccessfullybecausethevalueoftheVALUEparametermustbe1,2,or3.

    C.ThecodewillnotbeexecutedsuccessfullybecausethevalueoftheVALUEparametermustrangebetween1and5.

    D.ThecodewillnotbeexecutedsuccessfullybecausenoSET_ATTRIBUTEprocedureexistsintheDBMS_SCHDULERpackage.


    参考答案:C

  • 第5题:

    以下程序的执行结果为()。includeclass myClass{Dublic:myClass(intdata) ;myClass(

    以下程序的执行结果为( )。 #include<iostream.h> class myClass { Dublic: myClass(int data) ; myClass(){value=0; }; myClass(myClass &obj); void print(){ cout<<value<<end1; } ~myClass(){} private: int value; }; myClass::myClass(int data) {value=data; } myClass::myClass(myClass &Obj) { value=obj.value; } void main() { myClass a(100); myClass b(a) ; b.print(); }

    A.0

    B.100

    C.10

    D.程序编译时出错


    正确答案:B
    解析:题中类myClass定义了一个拷贝初始化构造函数myClass(myClass&obj)。在主函数中,系统首先自动调用相应的构造函数建立对象,然后调用拷贝构造函数对对象b进行初始化。所以程序最后的输出为100。

  • 第6题:

    The boy lay in the street,his eyes_______and his hands______.

    A.closing;trembling
    B.closed;trembled
    C.closing;trembled
    D.closed;tremblin

    答案:D
    解析: