Tải bản đầy đủ (.pdf) (16 trang)

c++, ngôn ngữ lập trình cho ngành cntt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (251.46 KB, 16 trang )

6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
1/16
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffree
download
1.WhichofthefollowinglanguagesisasubsetofC++language?
A.Clanguage
B.JavaLanguage
C.C#language
D.Blanguage
Answer:A
2.WhichofthefollowingcorrectlydescribesC++language?
A.Staticallytypedlanguage
B.Dynamicallytypedlanguage
C.BothStaticallyanddynamicallytypedlanguage
D.Typelesslanguage
Answer:A
3.Whichofthefollowingkeywordsupportsdynamicmethodresolution?
A.abstract
B.Virtual
C.Dynamic
D.Typeid
Answer:B
4.WhichofthefollowinglanguageisnotsupportedbyC++?
A.ExceptionHandling
B.Reflection
C.OperatorOverloading
D.Namespaces
Answer:B
5.WhichofthefollowinglanguagefeatureisnotanaccessspecifierinC++?
A.public


B.private
Cprotected
D.internal
Answer:D
6.WhatdoesSTLstandfor?
A.SimpleTemplateLibrary
B.StandardTemplateLibrary
C.StaticTypeLibrary
D.SingleTypebasedLibrary

Search
Home
C++InterviewQuestions
C++MultipleChoiceQuestionsand
Answers
CPPStudyMaterialpdf
Followers
Jointhissite
withGoogleFriendConnect
Members(4)
Alreadyamember?Signin
Categories
C++ObjectivetypeQuestionsand
Answers(1)
C++QuestionsandAnswersfor
Freshers(1)
AtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C++
StudyMaterial
03:10 AtoZC++InterviewQuestions,AtoZCPPObjectiveTypeQuestions,AtoZ
C++StudyMaterial Nocomments

Home C++InterviewQuestions C++MultipleChoiceQuestions C++Tutorial
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
2/16
Answer:B
7.WhichofthefollowingisthemostcommonwayofimplementingC++?
A.C++programsaredirectlycompiledintonativecodebyacompiler
B.C++programsarefirstcompiledtointermediatecodebyacompilerandthenexecutedbya
virtualmachine
C.C++programsareinterpretedbyaninterpreter
D.AC++editordirectlycompilesandexecutestheprogram
Answer:A
8.Whatistheimplicitpointerthatispassedasthefirstargumentfornonstaticmember
functions?
A.‘self’pointer
B.std::auto_ptrpointer
C.‘Myself’pointer
D.‘this’pointer
Answer:D
9.IfXisthenameoftheclass,whatisthecorrectwaytodeclarecopyconstructorofX?
A.X(Xarg)
B.X(X*arg)
C.X(constX*arg)
D.X(constX&arg)
Answer:D
10.Whichofthefollowingoperatorcannotbeoverloaded?
A.=(assignmentoperator)
B.==(equalityoperator)
C.–>(rowoperator)
D.::(coperesolutionoperator)

Answer:D
11.Whichofthefollowingoperatorscanbeoverloaded?
A..(dotormemberaccessoperator)
B.&(addressofoperator)
C.sizeofoperator
D.?:(conditionaloperator)
Answer:B
12.Howdowedeclareanabstractclass?
A.Byprovidingatleastonepurevirtualmethod(functionsignaturefollowedby==0;)inaclass
B.Bydeclaringatleastonemethodabstractusingthekeyword‘abstract’inaclass
C.Bydeclaringtheclassabstractwiththekeyword‘abstract’
D.ItisnotpossibletocreateabstractclassesinC++
Answer:A
13.Howdowedeclarean‘interface’class?
A.Bymakingallthemethodspurevirtualinaclass
B.Bymakingallthemethodsabstractusingthekeyword‘abstract’inaclass
C.Bydeclaringtheclassasinterfacewiththekeyword‘interface’
D.ItisnotpossibletocreateinterfaceclassinC++
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
3/16
Answer:A
14.Howmanycopiesofaclassstaticmemberaresharedbetweenobjectsoftheclass?
A.Acopyofthestaticmemberissharedbyallobjectsofaclass
B.Acopyiscreatedonlywhenatleastoneobjectiscreatedfromthatclass
C.Acopyofthestaticmemberiscreatedforeachinstntiationoftheclass
D.Nomemoryisallocatedforstaticmembersofaclass
Answer:A
15.Whichofthefollowingistrueaboutconstmemberfunctions?
A.constmemberscanbeinvokedonbothconstaswellasnonconstobjects

B.constmemberscanbeinvokedonlyonconstobjectsandnotonnonconstobjects
C.nonconstmemberscanbeinvokedonconstobjectsaswellasnonconstobjects
D.noneoftheabove
Answer:A
16.Whenisstd::bad_allocexceptionthrown?
A.Whennewoperatorcannotallocatememory
B.Whenallocfunctionfails
C.Whentyperequestedfornewoperationisconsideredbad,thisexceptionisthrown
D.Whendeleteoperatorcannotdeletetehallocated(corrupted)object
Answer:A
17.Whichheaderfileshouldweincludeforusingstd::auto_ptr?
a.<memory>
B.<alloc>
C.<autoptr>
D.<smartptr>
Answer:C
18.STLisbasedonwhichofthefollowingprogrammingparadigms?
A.StructuredProgramming
B.ObjectOrientedProgramming(OOP)
C.FunctionalProgramming
D.AspectOrientedProgramming(AOP)
Answer:C
19.Whichofthefollowingcorrectlydescribesthemeaningof‘namespace’featureinC++?
A.Namespacesrefertothememoryspaceallocatedfornamesusedinaprogram
B.Namespacesrefertospacebetweentehnamesinaprogram
C.Namespacesrefertospacebetweenthenamesinaprogram
D.namespacesprovidefacilitiesfororganizingthenamesinaprogramtoavoidnameclashes
Answer:D
20.Whichofthefollowingisthemostgeneralexceptionhandlerthatcatchesexceptionofany
type?

A.catch(std::exception)
B.catch(std::any_exception)
C.catch(…)
D.catch()
Answer:C
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
4/16
21.STLisbasedonwhichofthefollowingprogrammingparadigms?
a.StructuredProgramming
b.ObjectOrientedProgramming(OOP)
c.FunctionalProgramming
d.AspectOrientedProgramming(AOP)
ans:c
22.Whichofthefollowingcorrectlydescribesthemeaningof‘namespace’featureinC++?
a.Namespacesrefertothememoryspaceallocatedfornamesusedinaprogram
b.Namespacesrefertospacebetweenthenamesinaprogram
c.Namespacesrefertopackingstructureofclassesinaprogram.
d.Namespacesprovidefacilitiesfororganizingthenamesinaprogramtoavoidnameclashes.
ans:d
23.Whichofthefollowingisthemostgeneralexceptionhandlerthatcatchesexceptionof‘any
type’?
a.catch(std::exception)
b.catch(std::any_exception)
c.catch(…)
d.catch()
ans:c
24.Whichofthefollowingrelationshipisknownasinheritancerelationship?
a.‘hasa’relationship
b.‘isa’relationship

c.associationrelationship
d.noneoftheabove
ans:b
25.Whichofthefollowingoperatorscanbeimplementedasanonmemberoperator?
a.=(assignmentoperator)
b.()(functioncalloperator)
c.[.(arrayaccessoperator)
d.+(additionoperator)
ans:d
26.WhichoftheSTLcontainersstoretheelementscontiguously(inadjecentmemory
locations)?
a.std::vector
b.std::list
c.std::map
d.std::set
ans:a
27.Whichofthefollowingisnotrecommendedinaheaderfile?
a.Typedefinitions(typedefs)
b.Classdefinitions
c.Functiondefinitions
d.Templatedefinitions
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
5/16
ans:c
28.IftheclassnameisX,whatisthetypeofits“this”pointer(inanonstatic,nonconst
memberfunction)?
a.constX*const
b.X*const
c.X*

d.X&
ans:b
29.Whichofthefollowingisthemostpreferredwayofthrowingandhandlingexceptions?
a.Throwbyvalueandcatchbyreference.
b.Throwbyreferenceandcatchbyreference.
c.Throwbyvalueandcatchbyvalue
d.Throwthepointervalueandprovidecatchfortehpointertype.
Ans:a
30.IfclassAisfriendofclassBandifclassBisfriendofclassC,whichofthefollowingis
true?
a.ClassCisfriendofclassA
b.ClassAisfriendofclassC
c.ClassAandClassCdonothaveanyfriendrelationship
d.Noneoftheabove
Ans:c
31.Theconditionalcompilation
a.Itistakencareofbythecompiler
b.Itissettingthecompileroptionconditionally
c.Itiscompilingaprogrambasedonacondition
d.noneofabove
ans:c
32.Originally‘C’wasdevelopedas:
a.Systemprogramminglanguage
b.Generalpurposelanguage
c.Dataprocessinglanguage
d.Noneofabove
Ans:b
33.Minimumnumberoftemporaryvariagbleneededtoswapthecontentsof2variableis:
a.1
b.2

c.3
d.0
Ans:d
34.Adirectaccessfileis:
a.Afileinwhichrecoredsarearrangedinawaytheyareinsertedinafile
b.Afileinwhichrecordsarearrangedinaparticularorder
c.Fileswhicharestoredonadirectaccessstoragemedium
d.Noneoftheabove
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
6/16
Ans:c
35.Whichofthefollowingisnotanadvantageofsecondarymemory
a.Itiscosteffective
b.Ithaslargestoragecapacity
c.Ithashighestspeed
d.Itiseasilyportable
Ans:c
36.Aninvertedfile
a.Locatesinformationaboutdatainsmallfilesthataremaintainedapartfromactualdata
record
b.Afilewhichstoresoppositerecords
c.Afilewhichstoresinformationaboutrecordsofasystem
d.Noneofabove
Ans:a
37.Whichofthefollowingisnotafileoperation:
a.Repositioning
b.Truncating
c.Appending
d.Noneofabove

Ans:d
38.Whichofthefollowingisnotacomponentoffilesystem
a.Accessmethod
b.Auxiliarystoragemanagement
c.Freeintegritymechanism
d.Noneoftheabove
Ans:d
39.Seektimeis
a.timetakentoretrieveadta
b.Timetakenbyread/writeheadmechanismtopositionitselfoverappropriatecylinder
c.Timetakenbyappropriatesectortocomeunderread/write
d.Noneoftheabove
Ans:b
40.Latencytimeis:
a.Timetakenbyread/writeheadmechanismtopositionitselfoverappropriatecylinder
b.Timetakentotransferadtafrommemory
c.Timetakenbyappropriatesectortocomeunderread/writehead
d.Noneofabove
Ans:c
41.‘Primearea’incontextoffilesystemisdefinedas
a.Itismemoryareacreatedbyoperatingsystem
b.Itisanareaintowhichdatarecordsarewritten
c.Itisthemainareaofawebpage
d.Noneoftheabove
Ans:b
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
7/16
42.ThetwotypesoffilestructureexistinginVSAMfileare
a.Keysequencedstructure,entrysequencedstructure

b.Keysequencestructure,exitsequencedstructure
c.Entrysequencestructure,exitsequencedstructure
d.Noneofabove
Ans:c
43.Inmulitlistorganization
a.Recordsthathaveequivalentvalueforagivensecondaryindexitemarelinkedtogetherto
formalist.
b.Recordsareloadedinorderedsequencedefinedbycollatingsequencebycontentofthe
key
c.Recordsaredirectlyaccessedbyrecordkeyfield
d.Noneoftheabove
Ans:a
44.Whichofthefollowingis/areadvantagesofcellularpartitionedstructure:
a.Simultaneousreadoperationscanbeoverlapped
b.Searchtimeisreduced
c.Botha&b
d.Noneoftheabove
Ans:c
45.*ptr++isequivalenetto:
a.ptr++
b.*ptr
c.++*ptr
d.Noneoftheabove
Ans:d
46.Statementscanf(“%d”,80);
a.Assignanintegertovariablei
b.Giveanerrormessage
c.Printthevalueofi
d.Assignanfloattovariablei
Ans:a

47.Valueofix+j,ifi,jareintegertypeandixlongtypewouldbe
a.integer
b.float
c.longinteger
d.doublepercision
ans:c
48.InaClanguage‘3’represents
a.Adigit
b.Aninteger
c.Acharacter
d.Aword
Ans:c
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
8/16
49.InClanguage,ahexadecimalnumberisrepresentedbywriting
a.x
b.xo
c.ox
d.h
ans:d
50.ExpressionC=i++causes
a.ValueofiassignedtoCandtheniincrementedby1
b.itobeincrementedby1andthenvalueofiassignedtoC
c.ValueofiassignedtoC
d.itobeincrementedby1
ans:a
51.Eachpassthroughaloopiscalleda/an
a.enumeration
b.iteration

c.culmination
d.passthrough
Ans:b
52.Whichloopingprocesschecksthetestconditionattheendoftheloop?
a.for
b.while
c.dowhile
d.noloopingprocesschecksthetestconditionattheend
Ans:c
53.Acontinuestatementcausesexecutiontoskipto
a.thereturn0;statement
b.thefirststatementaftertheloop
c.thestatementfollowingthecontinuestatement
d.thenextiterationoftheloop
Ans:d
54.Inagroupofnestedloops,whichloopisexecutedthemostnumberoftimes?
a.theoutermostloop
b.theinnermostloop
c.allloopsareexecutedthesamenumberoftimes
d.cannotbedeterminedwithoutknowingthesizeoftheloops
Ans:b
55.Thestatementi++;isequivalentto
a.i=i+i;
b.i=i+1;
c.i=i1;
d.i;Ans:b
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
9/16
56.Whichloopingprocessisbestusedwhenthenumberofiterationsisknown?

a.for
b.while
c.dowhile
d.allloopingprocessesrequirethattheiterationsbeknown
Ans:a
57.What'swrong?for(intk=2,k<=12,k++)
a.theincrementshouldalwaysbe++k
b.thevariablemustalwaysbetheletteriwhenusingaforloop
c.thereshouldbeasemicolonattheendofthestatement
d.thecommasshouldbesemicolons
Ans:d
58.What'swrong?while((i<10)&&(i>24))
a.thelogicaloperator&&cannotbeusedinatestcondition
b.thewhileloopisanexitconditionloop
c.thetestconditionisalwaysfalse
d.thetestconditionisalwaystrue
Ans:c
59.Ifthereismorethanonestatementintheblockofaforloop,whichofthefollowingmustbe
placedatthebeginningandtheendingoftheloopblock?
a.parentheses()
b.braces{}
c.brackets[].
d.arrows<>Ans:b
60.What'swrong?(x=4&&y=5)?(a=5);(b=6);
a.thequestionmarkshouldbeanequalsign
b.thefirstsemicolonshouldbeacolon
c.therearetoomanyvariablesinthestatement
d.theconditionaloperatorisonlyusedwithapstrings
Ans:b
61.Inlinefunctionsareinvokedatthetimeof

A.Runtime
B.Compiletime
C.Dependsonhowitisinvoked
D.Bothbandcabove
Ans:B
62.Whichofthefollowingoperatorsbelowallowtodefinethememberfunctionsofaclass
outsidetheclass?
A.::
B.?
C.:?
D.%Ans:A
63.Everyclasshasatleastoneconstructorfunction,evenwhennoneisdeclared.
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
10/16
A.True
B.False
Ans:A
64.Howdowedefineaconstructor?
A.X~(){}
B.X(){}~
C.X()~{}
D.~X(){}
Ans:D
65.Canconstructorsbeoverloaded?
A.No
B.Yes
Ans:B
66.Whichofthefollowingbelowcanperformconversionsbetweenpointerstorelatedclasses?
A.cast_static

B.dynamic_cast
C.static_cast
D.cast_dynamic
Ans:C
67.Anabstractclasscanbeinstantiated.
A.True
B.False
Ans:B
68.Thedefaultaccesslevelassignedtomembersofaclassis___________
A.Private
B.Public
C.Protected
D.Needstobeassigned
Ans:A
69.Whichclassesallowprimitivetypestobeaccessedasobjects?
A.Storage
B.Virtual
C.Friend
D.Wrapper
Ans:D
70.Whichofthefollowingbelowis/areavaliditeratortype?
A.InputIterator
B.BackwardIterator
C.ForwardIterator
D.Bothaandcabove
Ans:D
71.Whatisthedifferencebetweenoverloadedfunctionsandoverriddenfunctions?
A.OverloadingisadynamicorruntimebindingandOverridingisstaticorcompiletime
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…

11/16
binding
B.RedefiningafunctioninafriendclassiscalledfunctionoverridingwhileRedefininga
functioninaderivedclassiscalledaoverloadedfucntion.
C.OverloadingisastaticorcompiletimebindingandOverridingisdynamicorruntime
binding
D.RedefiningafunctioninafriendclassiscalledfunctionoverloadingwhileRedefininga
functioninaderivedclassiscalledasoverriddenfucnion.
Ans:C
72.Whatisshallowcopy?
A.Ashallowcopycreatesacopyofthedynamicallyallocatedobjectstoo.
B.Ashallowcopyjustcopiesthevaluesofthedataastheyare.
C.Ashallowcopycreatesacopyofthestaticallyallocatedobjectstoo
D.Bothbandcabove
Ans:B
73.Whichofthefollowinglibraryfunctionbelowbydefaultabortstheprogram?
A.Terminate()
B.end()
C.Abort()
D.exit()
Ans:A
74.Whatdefinesageneralsetofoperationsthatwillbeappliedtovarioustypesofdata?
A.Templateclass
B.Functiontemplate
C.Classtemplate
D.Bothaandcabove
Ans:B
75.Whathappenswhenapointerisdeletedtwice?
A.Itcanaborttheprogram
B.Itcancauseafailure

C.Itcancauseanerror
D.Itcancauseatrap
Ans:D
76.Whatisdeepcopy?
A.Adeepcopycreatesacopyofthedynamicallyallocatedobjectstoo.
B.Adeepcopyjustcopiesthevaluesofthedataastheyare.
C.Adeepcopycreatesacopyofthestaticallyallocatedobjectstoo
D.Bothbandcabove
Ans:A
77.Thereisnothinglikeavirtualconstructorofaclass.
A.False
B.True
Ans:A
78.WhatistheDifferencebetweenstructandclassintermsofAccessModifier?
A.Bydefaultallthestructmembersareprivatewhilebydefaultclassmembersarepublic.
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
12/16
B.Bydefaultallthestructmembersareprotectedwhilebydefaultclassmembersare
private.
C.Bydefaultallthestructmembersarepublicwhilebydefaultclassmembersareprivate.
D.Bydefaultallthestructmembersarepublicwhilebydefaultclassmembersareprotected.
Ans:C
79.Vtables
A.createsastatictableperclass
B.createsastatictableperobject
C.createsadynamictableperclass
D.createsadynamictableperobject
Ans:A
80.C++providesfacilitytospecifythatthecompilershouldmatchfunctioncallswiththe

correctdefinitionattheruntime.Thisprocessiscalledas
A.Staticbinding
B.DynamicBinding
Ans:B
81.Theoutputofthisprogramis
int
main(){cout<<"HelloWorld!"return0;}
A.HelloWorld
B.Syntaxerror
C.0
D.HelloWorld!
Ans:B
82.Whichofthefollowingisnottrueaboutpreprocessordirectives
A.Theybeginwithahashsymbol
B.Theyareprocessedbyapreprocessor
C.Theyformanintegralpartofthecode
D.Theyhavetoendwithasemicolon
Ans:D
83.WhichoneofthefollowingisnotavalidreservedkeywordinC++
A.Explicit
B.Public
C.Implicit
D.Private
Ans:C
84.WhichoneofthefollowingisnotafundamentaldatatypeinC++
A.float
B.string
C.int
D.wchar_t
Ans:B

85.Thereturnvalueofthefollowingcodeis
Class1&test(Class1obj)
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
13/16
{
Class1*ptr=newClass1();

returnptr;
}
A.objectofClass1
B.referencetoptr
C.referenceofClass1
D.objectpointedbyptr
Ans:B
86.Theoutputof
{
inta=5;
intb=10;
cout<<(a>b?a:b);
}
A.5
B.10
C.Syntaxerror
D.Noneofabove
Ans:B
87.inta=10;
voidmain()
{
inta=20;

cout<<a<<::a;
}
Theoutputofthisprogramis
A.Syntaxerror
B.1020
C.2010
D.2020
Ans:C
88.WhenclassBisinheritedfromclassA,whatistheorderinwhichtheconstructersofthose
classesarecalled
A.ClassAfirstClassBnext
B.ClassBfirstClassAnext
C.ClassB'sonlyasitisthechildclass
D.ClassA'sonlyasitistheparentclass
Ans:A
89.Valueofaina=(b=5,b+5);is
A.Junkvalue
B.Syntaxerror
C.5
D.10
Ans:D
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
14/16
90.Writetheoutputofthefollowing:
char*mychar;//pointstomemorylocation1000
short*myshort;//pointstomemorylocation2000
long*mylong//pointstomemorylocation3000
mychar++;
++myshort;

mylong++;
cout<<mychar<<myshort<<mylong;
A.100120013001
B.100120023004
C.100120013002
D.100120023004
Ans:B
91.Anullpointerisnothingbutavoidpointerpointingtonowhere.
A.True
B.False
Ans:B
92.Whichofthefollowingmembersdogetinheritedbutbecomeprivatemembersinchildclass
A.Public
B.Private
C.Protected
D.Alltheabove
Ans:C
93.Whichofthefollowingisavaliddestructoroftheclassname"Country"
A.int~Country()
B.voidCountry()
C.int~Country(Countryobj)
D.void~Country()
Ans:D
94.classExample{
public:inta,b,c;
Example(){a=b=c=1;}//Constructor1
Example(inta){a=a;b=c=1;}//Constructor2
Example(inta,intb){a=a;b=b;c=1;}//Constructor3
Example(inta,intb,intc){a=a;b=b;c=c;}//Constructor4
}

Intheaboveexampleofconstructoroverloading,thefollowingstatementwillcallwhich
constructor
Exampleobj=newExample(1,2,3.3);
A.Constructor2
B.Constructor4
C.Constrcutor1
D.Typemismatcherror
Ans:B
95.classderived:publicbase1,publicbase2{}isanexampleof
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
15/16
OlderPost
A.Polymorphicinheritance
B.Multilevelinheritance
C.Hierarchicalinheritance
D.Multipleinheritance
Ans:D
96.Ifamemberneedstohaveuniquevalueforalltheobjectsofthatsameclass,declarethe
memberas
A.Globalvariableoutsideclass
B.Localvariableinsideconstructor
C.Staticvariableinsideclass
D.Dynamicvariableinsideclass
Ans:B
97.WhichofthefollowingisnotastandardexceptionbuiltinC++.
A.std::bad_creat
B.std::bad_alloc
C.std::bad_cast
D.std::bad_typeid

Ans:A
98.Whichofthefollowingisnotavalidconditionalinclusionsinpreprocessordirectives
A.#ifdef
B.#ifundef
C.#endif
D.#elif
Ans:B
99.Underwhichofthefollowingcircumstances,synchronizationtakesplace?
A.Whenthefileisclosed
B.Whenthebufferisempty
C.Explicitly,withmanipulators
D.bothaandc
Ans:D
100.WhichofthefollowingfunctionsbelowcanbeusedAllocatespaceforarrayinmemory?
A.calloc()
B.malloc()
C.Realloc()
D.bothaandb
Ans:A
Postedin:C++ObjectivetypeQuestionsandAnswers
   
0  c o m m e n t s :
P o s t  a  C o m m e n t
+1 Recommend this on Google
6/9/2015
100TopC++MultipleChoiceQuestionsandAnswersforfresherspdffreedownloadAtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C+…
16/16
Enteryourcomment
Commentas:
GoogleAccount

Publish

Preview
Bloggernews

AtoZC++InterviewQuestions,ObjectiveTypeQuestions,StudyMaterialsforCPP.
AtoZC++InterviewQuestions,CPPObjectiveTypeQuestions,C++StudyMaterial

×