欢迎来到天天文库
浏览记录
ID:6821516
大小:105.00 KB
页数:20页
时间:2018-01-27
《面向对象程序设计(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<<”
2、Helloworld”D.cin<<”Helloworld”2、Theresultoftheprogramis().#includedoublef(doublex,intn){doubleval=1.0;while(n--)val=val*x;return(val);}voidmain(void){cout<3、int*ptr;i=*ptrC.int*ptr;ptr=0D.inti=5;int*ptr;*ptr=i4、Inthefollowingfunctions,()cannotbeoverloaded.A.CommonmemberfunctionsB.Commonnon-memberfunctionsC.Destructor D.Constructor5、Afterexecutingthefollowingprogram,()istheresult.#include4、eam.h>voidSwap(inta,intb){intt;t=a;a=b;b=t;}第20页共20页intmain(){intx=5,y=10;Swap(x,y);cout<<"x="<5、asswillbecome()membersforderivedclass.A. public B.private C.protected D.friend7、Foroperatoroverloading,()iscorrect.A.ThenumberofoperandscanbechangedB.ThepriorityforoperatorscanbechangedC.Thesyntaxforoperatorscan’tbechangedD.Thecombi6、nationsequencecanbechanged8、()isnotrightforthedescriptionofclass.A.ClassisauserdefinedtypeB.TheprivatememberscanbeaccessedbyfriendfunctionsinclassC.Inclass,withoutdeclarationthememberdataareprivateD.Inclass,withoutdeclarationthememberfunctionsarepubli7、c9、GivenaclassMyClass,afterexecutingthesentence:MyClassa,b,*p,theconstructorwillbecalled()times.A.1B.2C.3D.410、Thedefaultconstructorcanexistinthesituationof().A.AllthetimeB.NocopyconstructorisgivenC.NoconstructorwithargumentsisgivenD.Noconstructorisgi8、ven11、Afriendfunctioninaclassorafriendclasscanaccess()oftheclass.A.publicmembersB.protectedmembersC.privatemembersD.allmembers12、Forstaticmemberdata,itisinitializedat().A.BeforethedeclarationofclassandafterthemainfunctionB.Beforethemainfunctio
3、int*ptr;i=*ptrC.int*ptr;ptr=0D.inti=5;int*ptr;*ptr=i4、Inthefollowingfunctions,()cannotbeoverloaded.A.CommonmemberfunctionsB.Commonnon-memberfunctionsC.Destructor D.Constructor5、Afterexecutingthefollowingprogram,()istheresult.#include4、eam.h>voidSwap(inta,intb){intt;t=a;a=b;b=t;}第20页共20页intmain(){intx=5,y=10;Swap(x,y);cout<<"x="<5、asswillbecome()membersforderivedclass.A. public B.private C.protected D.friend7、Foroperatoroverloading,()iscorrect.A.ThenumberofoperandscanbechangedB.ThepriorityforoperatorscanbechangedC.Thesyntaxforoperatorscan’tbechangedD.Thecombi6、nationsequencecanbechanged8、()isnotrightforthedescriptionofclass.A.ClassisauserdefinedtypeB.TheprivatememberscanbeaccessedbyfriendfunctionsinclassC.Inclass,withoutdeclarationthememberdataareprivateD.Inclass,withoutdeclarationthememberfunctionsarepubli7、c9、GivenaclassMyClass,afterexecutingthesentence:MyClassa,b,*p,theconstructorwillbecalled()times.A.1B.2C.3D.410、Thedefaultconstructorcanexistinthesituationof().A.AllthetimeB.NocopyconstructorisgivenC.NoconstructorwithargumentsisgivenD.Noconstructorisgi8、ven11、Afriendfunctioninaclassorafriendclasscanaccess()oftheclass.A.publicmembersB.protectedmembersC.privatemembersD.allmembers12、Forstaticmemberdata,itisinitializedat().A.BeforethedeclarationofclassandafterthemainfunctionB.Beforethemainfunctio
4、eam.h>voidSwap(inta,intb){intt;t=a;a=b;b=t;}第20页共20页intmain(){intx=5,y=10;Swap(x,y);cout<<"x="<5、asswillbecome()membersforderivedclass.A. public B.private C.protected D.friend7、Foroperatoroverloading,()iscorrect.A.ThenumberofoperandscanbechangedB.ThepriorityforoperatorscanbechangedC.Thesyntaxforoperatorscan’tbechangedD.Thecombi6、nationsequencecanbechanged8、()isnotrightforthedescriptionofclass.A.ClassisauserdefinedtypeB.TheprivatememberscanbeaccessedbyfriendfunctionsinclassC.Inclass,withoutdeclarationthememberdataareprivateD.Inclass,withoutdeclarationthememberfunctionsarepubli7、c9、GivenaclassMyClass,afterexecutingthesentence:MyClassa,b,*p,theconstructorwillbecalled()times.A.1B.2C.3D.410、Thedefaultconstructorcanexistinthesituationof().A.AllthetimeB.NocopyconstructorisgivenC.NoconstructorwithargumentsisgivenD.Noconstructorisgi8、ven11、Afriendfunctioninaclassorafriendclasscanaccess()oftheclass.A.publicmembersB.protectedmembersC.privatemembersD.allmembers12、Forstaticmemberdata,itisinitializedat().A.BeforethedeclarationofclassandafterthemainfunctionB.Beforethemainfunctio
5、asswillbecome()membersforderivedclass.A. public B.private C.protected D.friend7、Foroperatoroverloading,()iscorrect.A.ThenumberofoperandscanbechangedB.ThepriorityforoperatorscanbechangedC.Thesyntaxforoperatorscan’tbechangedD.Thecombi
6、nationsequencecanbechanged8、()isnotrightforthedescriptionofclass.A.ClassisauserdefinedtypeB.TheprivatememberscanbeaccessedbyfriendfunctionsinclassC.Inclass,withoutdeclarationthememberdataareprivateD.Inclass,withoutdeclarationthememberfunctionsarepubli
7、c9、GivenaclassMyClass,afterexecutingthesentence:MyClassa,b,*p,theconstructorwillbecalled()times.A.1B.2C.3D.410、Thedefaultconstructorcanexistinthesituationof().A.AllthetimeB.NocopyconstructorisgivenC.NoconstructorwithargumentsisgivenD.Noconstructorisgi
8、ven11、Afriendfunctioninaclassorafriendclasscanaccess()oftheclass.A.publicmembersB.protectedmembersC.privatemembersD.allmembers12、Forstaticmemberdata,itisinitializedat().A.BeforethedeclarationofclassandafterthemainfunctionB.Beforethemainfunctio
此文档下载收益归作者所有