Вы находитесь на странице: 1из 20

(HTTP://INTERVIEWQUESTIONSANSWERSPDF.

CO

HOME(http://interviewquestionsanswerspdf.com/)C++MultipleChoice
Questions(http://interviewquestionsanswerspdf.com/category/cmultiple
choicequestions/)50REALTIMEC++MultipleChoiceQuestionsand
Answers

50REALTIMEC++MULTIPLECHOICEQUESTIONS
ANDANSWERS

DownloadFreeWhitePaper

Download

ZeroErrorinManufacturingofParts,ModulesandKits.
Gotomt.com/ZeroError

FreeDownloadGo
tounzipper.com

Adsby Google

QuestionsandAnswers
InterviewQuestionsPDF

Belowarethelistoftop50C++multiplechoice
questionsandanswersforfreshersbeginnersand
experiencedpdf.

C++MultipleChoiceQuestionsand
Answers:
1.WhichofthefollowinglanguagesisasubsetofC++language?
A.Clanguage

B.JavaLanguage
C.C#language
D.Blanguage
Answer:A.CLanguage

2.WhichofthefollowingcorrectlydescribesC++language?
A.Staticallytypedlanguage
B.Dynamicallytypedlanguage
C.BothStaticallyanddynamicallytypedlanguage
D.Typelesslanguage
Answer:A.Staticallytypedlangauge

3.Whichofthefollowingkeywordsupportsdynamicmethod
resolution?
A.abstract
B.Virtual
C.Dynamic
D.Typeid
Answer:B.Virtual

C++MultipleChoiceQuestionsandAnswers

4.WhichofthefollowinglanguageisnotsupportedbyC++?
A.ExceptionHandling
B.Reflection
C.OperatorOverloading

C.OperatorOverloading
D.Namespaces
Answer:B.Reflection.

5.Whichofthefollowinglanguagefeatureisnotanaccessspecifierin
C++?
A.public
B.private
Cprotected
D.internal
Answer:D.Internal

6.WhatdoesSTLstandfor?
A.SimpleTemplateLibrary
B.StandardTemplateLibrary
C.StaticTypeLibrary
D.SingleTypebasedLibrary
Answer:STLstandsforStandardTemplateLibrary

7.Whichofthefollowingisthemostcommonwayof
implementingC++?
A.C++programsaredirectlycompiledintonativecodebyacompiler
B.C++programsarefirstcompiledtointermediatecodebyacompilerandthen
executedbyavirtualmachine
C.C++programsareinterpretedbyaninterpreter
D.AC++editordirectlycompilesandexecutestheprogram
Answer:A.C++programsaredirectlycompiledintonativecodebya
compiler

8.Whatistheimplicitpointerthatispassedasthefirstargumentfor

8.Whatistheimplicitpointerthatispassedasthefirstargumentfor
nonstaticmemberfunctions?
A.selfpointer
B.std::auto_ptrpointer
C.Myselfpointer
D.thispointer
Answer:D.thispointer

9.IfXisthenameoftheclass,whatisthecorrectwaytodeclarecopy
constructorofX?
A.X(Xarg)
B.X(X*arg)
C.X(constX*arg)
D.X(constX&arg)
Answer:D.X(constX&arg)
10.Whichofthefollowingoperatorcannotbeoverloaded?
A.=(assignmentoperator)
B.==(equalityoperator)
C.>(rrowoperator)
D.::(coperesolutionoperator)
Answer:D.::(scoperesolutionoperator)
11.Whichofthefollowingoperatorscanbeoverloaded?
A..(dotormemberaccessoperator)
B.&(addressofoperator)
C.sizeofoperator
D.?:(conditionaloperator)
Answer:B.&(addressofoperator)
12.Howdowedeclareanabstractclass?

12.Howdowedeclareanabstractclass?
A.Byprovidingatleastonepurevirtualmethod(functionsignaturefollowedby
==0)inaclass
B.Bydeclaringatleastonemethodabstractusingthekeywordabstractinaclass
C.Bydeclaringtheclassabstractwiththekeywordabstract
D.ItisnotpossibletocreateabstractclassesinC++
Answer:A.Byprovidingatleastonepurevirtualmethod(functionsignature
followedby==0)

13.Howdowedeclareaninterfaceclass?
A.Bymakingallthemethodspurevirtualinaclass
B.Bymakingallthemethodsabstractusingthekeywordabstractinaclass
C.Bydeclaringtheclassasinterfacewiththekeywordinterface
D.ItisnotpossibletocreateinterfaceclassinC++
Answer:A.Bymakingallthemethodspurevirtualinaclass
14.Howmanycopiesofaclassstaticmemberaresharedbetween
objectsoftheclass?
A.Acopyofthestaticmemberissharedbyallobjectsofaclass
B.Acopyiscreatedonlywhenatleastoneobjectiscreatedfromthatclass
C.Acopyofthestaticmemberiscreatedforeachinstntiationoftheclass
D.Nomemoryisallocatedforstaticmembersofaclass
Answer:A.Acopyofthestaticmemberissharedbyallobjectsofaclass
15.Whichofthefollowingistrueaboutconstmemberfunctions?
A.constmemberscanbeinvokedonbothconstaswellasnonconstobjects
B.constmemberscanbeinvokedonlyonconstobjectsandnotonnonconst
objects
C.nonconstmemberscanbeinvokedonconstobjectsaswellasnonconstobjects
D.noneoftheabove

Answer:A.constmemberscanbeinvokedonbothconstaswellasnonconst
objects.
16.Whenisstd::bad_allocexceptionthrown?
A.Whennewoperatorcannotallocatememory
B.Whenallocfunctionfails
C.Whentyperequestedfornewoperationisconsideredbad,thisexceptionis
thrown
D.Whendeleteoperatorcannotdeletetehallocated(corrupted)object
Answer:A.Whennewoperatorcannotallocatememory
17.Whichheaderfileshouldweincludeforusingstd::auto_ptr?
a.<memory>
B.<alloc>
C.<autoptr>
D.<smartptr>
Answer:C.FunctionalProgramming
18.STLisbasedonwhichofthefollowingprogrammingparadigms?
A.StructuredProgramming
B.ObjectOrientedProgramming(OOP)
C.FunctionalProgramming
D.AspectOrientedProgramming(AOP)
Answer:C.FunctionalProgramming
19.Whichofthefollowingcorrectlydescribesthemeaningofnamespacefeature
inC++?
A.Namespacesrefertothememoryspaceallocatedfornamesusedinaprogram
B.Namespacesrefertospacebetweentehnamesinaprogram
C.Namespacesrefertospacebetweenthenamesinaprogram
D.namespacesprovidefacilitiesfororganizingthenamesinaprogramtoavoid

nameclashes
Answer:D.Namespaceprovidefacilitiesfororganizingthenamesina
programtoavoidnameclashes.

20.Whichofthefollowingisthemostgeneralexceptionhandlerthat
catchesexceptionofanytype?
A.catch(std::exception)
B.catch(std::any_exception)
C.catch()
D.catch()
Answer:C.catch()

21.STLisbasedonwhichofthefollowingprogrammingparadigms?
a.StructuredProgramming
b.ObjectOrientedProgramming(OOP)
c.FunctionalProgramming
d.AspectOrientedProgramming(AOP)
ans:c.FunctionalProgramming

22.Whichofthefollowingcorrectlydescribesthemeaning
ofnamespacefeatureinC++?
a.Namespacesrefertothememoryspaceallocatedfornamesusedinaprogram
b.Namespacesrefertospacebetweenthenamesinaprogram
c.Namespacesrefertopackingstructureofclassesinaprogram.
d.Namespacesprovidefacilitiesfororganizingthenamesinaprogramtoavoid
nameclashes.
ans:d.Namespacesprovidefacilitiesfororganizingthenames
inprogramtoavoidnameclashes


23.Whichofthefollowingisthemostgeneralexceptionhandlerthat
catchesexceptionofanytype?
a.catch(std::exception)
b.catch(std::any_exception)
c.catch()
d.catch()
ans:c.catch()

24.Whichofthefollowingrelationshipisknownas
inheritancerelationship?
a.hasarelationship
b.isarelationship
c.associationrelationship
d.noneoftheabove
ans:b.isarelationship.

25.Whichofthefollowingoperatorscanbeimplementedasa
nonmemberoperator?
a.=(assignmentoperator)
b.()(functioncalloperator)
c.[](arrayaccessoperator)
d.+(additionoperator)
ans:d.+(additionoperator)

26.WhichoftheSTLcontainersstoretheelementscontiguously(in
adjecentmemorylocations)?
a.std::vector

b.std::list
c.std::map
d.std::set
ans:a.std::vector

27.Whichofthefollowingisnotrecommendedinaheaderfile?
a.Typedefinitions(typedefs)
b.Classdefinitions
c.Functiondefinitions
d.Templatedefinitions

ans:c.Functiondefinitions

28.IftheclassnameisX,whatisthetypeofitsthispointer(ina
nonstatic,nonconstmemberfunction)?
a.constX*const
b.X*const
c.X*
d.X&
ans:b.X*const

29.Whichofthefollowingisthemostpreferredwayofthrowingand
handlingexceptions?
a.Throwbyvalueandcatchbyreference.
b.Throwbyreferenceandcatchbyreference.
c.Throwbyvalueandcatchbyvalue
d.Throwthepointervalueandprovidecatchfortehpointertype.
Ans:a.Throwbyvalueandcatchbyreference


30.IfclassAisfriendofclassBandifclassBisfriendofclassC,
whichofthefollowingistrue?
a.ClassCisfriendofclassA
b.ClassAisfriendofclassC
c.ClassAandClassCdonothaveanyfriendrelationship
d.Noneoftheabove
Ans:c.ClassAandclassCdonothaveanyfriendrelationship.

31.Theconditionalcompilation
a.Itistakencareofbythecompiler
b.Itissettingthecompileroptionconditionally
c.Itiscompilingaprogrambasedonacondition
d.noneofabove
ans:c.Itiscompilingaprogrambasedonacondition

32.OriginallyCwasdevelopedas:
a.Systemprogramminglanguage
b.Generalpurposelanguage
c.Dataprocessinglanguage
d.Noneofabove
Ans:b.Generalpurposelanguage

33.Minimumnumberoftemporaryvariagbleneededtoswapthe
contentsof2variableis:
a.1
b.2
c.3
d.0

d.0
Ans:d.0

34.Adirectaccessfileis:
a.Afileinwhichrecoredsarearrangedinawaytheyareinsertedinafile
b.Afileinwhichrecordsarearrangedinaparticularorder
c.Fileswhicharestoredonadirectaccessstoragemedium
d.Noneoftheabove
Ans:c.Fileswhicharestoredonadirectaccessstoragemedium

35.Whichofthefollowingisnotanadvantageofsecondarymemory
a.Itiscosteffective
b.Ithaslargestoragecapacity
c.Ithashighestspeed
d.Itiseasilyportable

Ans:c.Ithashighestspeed

36.Aninvertedfile
a.Locatesinformationaboutdatainsmallfilesthataremaintainedapartfrom
actualdatarecord
b.Afilewhichstoresoppositerecords
c.Afilewhichstoresinformationaboutrecordsofasystem
d.Noneofabove
Ans:a.Locatesinformationaboutdatainsmallfilesthatare
maintainedapartfromactualdatarecord

37.Whichofthefollowingisnotafileoperation:
a.Repositioning

a.Repositioning
b.Truncating
c.Appending
d.Noneofabove
Ans:d.Noneofabove

38.Whichofthefollowingisnotacomponentoffilesystem
a.Accessmethod
b.Auxiliarystoragemanagement
c.Freeintegritymechanism
d.Noneoftheabove
Ans:d.Noneoftheabove

39.Seektimeis
a.timetakentoretrieveadta
b.Timetakenbyread/writeheadmechanismtopositionitselfoverappropriate
cylinder
c.Timetakenbyappropriatesectortocomeunderread/write
d.Noneoftheabove
Ans:b.Timetakenbyread/writeheadmechanismtopositionitself
overappropriatecylinder

40.Latencytimeis:
a.Timetakenbyread/writeheadmechanismtopositionitselfoverappropriate
cylinder
b.Timetakentotransferadtafrommemory
c.Timetakenbyappropriatesectortocomeunderread/writehead
d.Noneofabove
Ans:c.Timetakenbyappropriatesectortocomeunderread/write

Ans:c.Timetakenbyappropriatesectortocomeunderread/write
head

41.Primeareaincontextoffilesystemisdefinedas
a.Itismemoryareacreatedbyoperatingsystem
b.Itisanareaintowhichdatarecordsarewritten
c.Itisthemainareaofawebpage
d.Noneoftheabove
Ans:b.Itisanareaintowhichdatarecordsarewritten

42.ThetwotypesoffilestructureexistinginVSAMfileare
a.Keysequencedstructure,entrysequencedstructure
b.Keysequencestructure,exitsequencedstructure
c.Entrysequencestructure,exitsequencedstructure
d.Noneofabove
Ans:c.Entrysequencestructure,exitsequencedstructure

43.Inmulitlistorganization
a.Recordsthathaveequivalentvalueforagivensecondaryindexitemarelinked
togethertoformalist.
b.Recordsareloadedinorderedsequencedefinedbycollatingsequenceby
contentofthekey
c.Recordsaredirectlyaccessedbyrecordkeyfield
d.Noneoftheabove
Ans:a.Recordsthathaveequivalentvalueforagivensecondaryindex
itemarelinkedtogethertoformalist.

44.Whichofthefollowingis/areadvantagesofcellularpartitioned
structure:

a.Simultaneousreadoperationscanbeoverlapped
b.Searchtimeisreduced
c.Botha&b
d.Noneoftheabove
Ans:c.Botha&b

45.*ptr++isequivalenetto:
a.ptr++
b.*ptr
c.++*ptr
d.Noneoftheabove
Ans:d.Noneoftheabove

46.Statementscanf(%d,80)
a.Assignanintegertovariablei
b.Giveanerrormessage
c.Printthevalueofi
d.Assignanfloattovariablei
Ans:a.Assignanintegertovariablei

47.Valueofix+j,ifi,jareintegertypeandixlongtypewouldbe
a.integer
b.float
c.longinteger
d.doublepercision
ans:c.longinteger

48.InaClanguage3represents

a.Adigit
b.Aninteger
c.Acharacter
d.Aword
Ans:c.Acharacter

49.InClanguage,ahexadecimalnumberisrepresentedbywriting
a.x
b.xo
c.ox
d.h
ans:d.h

50.ExpressionC=i++causes
a.ValueofiassignedtoCandtheniincrementedby1
b.itobeincrementedby1andthenvalueofiassignedtoC
c.ValueofiassignedtoC
d.itobeincrementedby1
ans:a.ValueofiassignedtoCandtheniincrementedby1

Download
FreeDownloadGotounzipper.com

April26,2014

iqapdf(http://interviewquestionsanswerspdf.com/author/iqapdf/)

C++MultipleChoice

Questions(http://interviewquestionsanswerspdf.com/category/cmultiplechoicequestions/)

LeaveaComment

(http://interviewquestionsanswerspdf.com/2014/04/cplusplusmultiplechoicequestionsandanswers/#respond)

50TOPC++MultipleChoiceQuestionsandAnswerspdf(http://interviewquestionsanswerspdf.com/tag/50
topcmultiplechoicequestionsandanswerspdf/)

TopMostChemistryInterviewQuestionsandAnswers
(http://interviewquestionsanswerspdf.com/2014/04/topmostchemistry

(http://interviewquestionsanswerspdf.com/2014/04/topmostchemistry
interviewquestionsandanswers/)
140REALTIMEASP.NETMultipleChoiceQuestionsandAnswers
(http://interviewquestionsanswerspdf.com/2014/04/aspnetmultiplechoice
questionsandanswers/)
ADDCOMMENT

Requiredfieldsaremarked*.Youremailaddresswillnotbepublished.
Comment

Name*

EmailAddress*

Website

POSTAQUESTION

Notifymeoffollowupcommentsbyemail.
Notifymeofnewpostsbyemail.

INTERVIEWQUESTIONSANSWERSPDF****LIKE***

InterviewQuestionsAnswers
188likes

LikePage

Share

Bethefirstofyourfriendstolikethis

InterviewQuestionswithAnswerspdffreedownloadforfreshersexperiencedMCQsRealtimecertificationbasicaskedprogramming

onIT&NONITPlacementPapers

Вам также может понравиться