欢迎来到天天文库
浏览记录
ID:14443512
大小:121.50 KB
页数:20页
时间:2018-07-28
《面向对象程序设计(c++)(双语)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、江西财经大学06-07学年第一学期期末考试试卷试卷代码:03874B课时:64学时课程名称:面向对象程序设计(C++)(双语)适用对象:05级信管、信计一、Single-Choice(Everyquestionis2point,totalis32point)1、()hasthesamefunctionasthesentence:printf(“Helloworld”)inClanguage.A.cout>>”Helloworld”B.cin>>”Helloworld”C.cout<<”Helloworld”D.cin<<”Helloworld”2
2、、Theresultoftheprogramis().#includedoublef(doublex,intn){doubleval=1.0;while(n--)val=val*x;return(val);}voidmain(void){cout<3、nctions,()cannotbeoverloaded.A.CommonmemberfunctionsB.Commonnon-memberfunctionsC.Destructor D.Constructor5、Afterexecutingthefollowingprogram,()istheresult.#includevoidSwap(inta,intb){intt;t=a;a=b;b=t;}第20页共20页intmain(){intx=5,y=10;Swap(x,y);cout<<"x="<4、y<5、umberofoperandscanbechangedB.ThepriorityforoperatorscanbechangedC.Thesyntaxforoperatorscan’tbechangedD.Thecombinationsequencecanbechanged8、()isnotrightforthedescriptionofclass.A.ClassisauserdefinedtypeB.TheprivatememberscanbeaccessedbyfriendfunctionsinclassC.Inclass,withoutdeclarationt6、hememberdataareprivateD.Inclass,withoutdeclarationthememberfunctionsarepublic9、GivenaclassMyClass,afterexecutingthesentence:MyClassa,b,*p,theconstructorwillbecalled()times.A.1B.2C.3D.410、Thedefaultconstructorcanexistinthesituationof().A.AllthetimeB.NocopyconstructorisgivenC.Noconstruct7、orwithargumentsisgivenD.Noconstructorisgiven11、Afriendfunctioninaclassorafriendclasscanaccess()oftheclass.A.publicmembersB.protectedmembersC.privatemembersD.allmembers12、Forstaticmemberdata,itisinitializedat().A.BeforethedeclarationofclassandafterthemainfunctionB.Beforethemainfunctio
3、nctions,()cannotbeoverloaded.A.CommonmemberfunctionsB.Commonnon-memberfunctionsC.Destructor D.Constructor5、Afterexecutingthefollowingprogram,()istheresult.#includevoidSwap(inta,intb){intt;t=a;a=b;b=t;}第20页共20页intmain(){intx=5,y=10;Swap(x,y);cout<<"x="<4、y<5、umberofoperandscanbechangedB.ThepriorityforoperatorscanbechangedC.Thesyntaxforoperatorscan’tbechangedD.Thecombinationsequencecanbechanged8、()isnotrightforthedescriptionofclass.A.ClassisauserdefinedtypeB.TheprivatememberscanbeaccessedbyfriendfunctionsinclassC.Inclass,withoutdeclarationt6、hememberdataareprivateD.Inclass,withoutdeclarationthememberfunctionsarepublic9、GivenaclassMyClass,afterexecutingthesentence:MyClassa,b,*p,theconstructorwillbecalled()times.A.1B.2C.3D.410、Thedefaultconstructorcanexistinthesituationof().A.AllthetimeB.NocopyconstructorisgivenC.Noconstruct7、orwithargumentsisgivenD.Noconstructorisgiven11、Afriendfunctioninaclassorafriendclasscanaccess()oftheclass.A.publicmembersB.protectedmembersC.privatemembersD.allmembers12、Forstaticmemberdata,itisinitializedat().A.BeforethedeclarationofclassandafterthemainfunctionB.Beforethemainfunctio
4、y<5、umberofoperandscanbechangedB.ThepriorityforoperatorscanbechangedC.Thesyntaxforoperatorscan’tbechangedD.Thecombinationsequencecanbechanged8、()isnotrightforthedescriptionofclass.A.ClassisauserdefinedtypeB.TheprivatememberscanbeaccessedbyfriendfunctionsinclassC.Inclass,withoutdeclarationt6、hememberdataareprivateD.Inclass,withoutdeclarationthememberfunctionsarepublic9、GivenaclassMyClass,afterexecutingthesentence:MyClassa,b,*p,theconstructorwillbecalled()times.A.1B.2C.3D.410、Thedefaultconstructorcanexistinthesituationof().A.AllthetimeB.NocopyconstructorisgivenC.Noconstruct7、orwithargumentsisgivenD.Noconstructorisgiven11、Afriendfunctioninaclassorafriendclasscanaccess()oftheclass.A.publicmembersB.protectedmembersC.privatemembersD.allmembers12、Forstaticmemberdata,itisinitializedat().A.BeforethedeclarationofclassandafterthemainfunctionB.Beforethemainfunctio
5、umberofoperandscanbechangedB.ThepriorityforoperatorscanbechangedC.Thesyntaxforoperatorscan’tbechangedD.Thecombinationsequencecanbechanged8、()isnotrightforthedescriptionofclass.A.ClassisauserdefinedtypeB.TheprivatememberscanbeaccessedbyfriendfunctionsinclassC.Inclass,withoutdeclarationt
6、hememberdataareprivateD.Inclass,withoutdeclarationthememberfunctionsarepublic9、GivenaclassMyClass,afterexecutingthesentence:MyClassa,b,*p,theconstructorwillbecalled()times.A.1B.2C.3D.410、Thedefaultconstructorcanexistinthesituationof().A.AllthetimeB.NocopyconstructorisgivenC.Noconstruct
7、orwithargumentsisgivenD.Noconstructorisgiven11、Afriendfunctioninaclassorafriendclasscanaccess()oftheclass.A.publicmembersB.protectedmembersC.privatemembersD.allmembers12、Forstaticmemberdata,itisinitializedat().A.BeforethedeclarationofclassandafterthemainfunctionB.Beforethemainfunctio
此文档下载收益归作者所有