EngineeringInterviewQuestions.
com
Engineeringinterviewquestions,multiplechoicequestions,objectivetype
questions,seminortopics,labvivaquestionsandanswers,onlinequiztestpdffree
downloadforfreshers.
HOME interviewQuestions MCQs *LABVIVA CLASSNOTES SEMINARTOPICS
ONLINETEST GATE IITJEE CAT
HomeC++ProgrammingQuestionsandAnswers100
TOPC++ProgrammingMultipleChoiceQuestions
andAnswers
100TOPC++Programming
MultipleChoiceQuestionsand
Answers
PostedonNovember17,2015 byengineer 4
Comments
C++ProgrammingMultipleChoice
QuestionsandAnswers:
[Link],whatisthetypeofitsthispointer
(inanonstatic,nonconstmemberfunction)?
[Link]*const
b.X*const
c.X*
d.X&
[Link]
objects?
[Link]
[Link]
[Link]
[Link]
[Link]::bad_allocexceptionthrown?
[Link]
[Link]
[Link],
thisexceptionisthrown
[Link]
(corrupted)object
[Link] Loading
inC++
[Link]
Engineering
Questions
[Link]
Facebook
[Link]
Finduson
d.wchar_t
GooglePlus
[Link]
nameCountry
[Link]~Country()
[Link]()
[Link]~Country(Countryobj)
[Link]~Country()
[Link]++language?
[Link]
[Link]
[Link]
[Link]
[Link]
resolution?
[Link]
[Link]
[Link]
[Link]
[Link]
throwingandhandlingexceptions?
[Link].
[Link].
[Link]
[Link]
type.
[Link]
directives
[Link]
[Link]
[Link]
[Link]
[Link]?while((i<10)&&(i>24))
[Link]&&cannotbeusedinatestcondition
[Link]
[Link]
[Link]
[Link]
a.thereturn0statement
[Link]
[Link]
[Link]
[Link]?(x=4&&y=5)?(a=5)(b=6)
[Link]
[Link]
[Link]
[Link]
[Link]?for(intk=2,k<=12,k++)
[Link]++k
[Link]
loop
[Link]
[Link]
[Link]
file?
[Link](typedefs)
[Link]
[Link]
[Link]
[Link]
contiguously(inadjacentmemorylocations)?
[Link]::vector
[Link]::list
[Link]::map
[Link]::set
[Link]
C++.
[Link]::bad_creat
[Link]::bad_alloc
[Link]::bad_cast
[Link]::bad_typeid
[Link]?
[Link]
[Link]
[Link]
[Link]
[Link]
overriddenfunctions?
[Link]
Overridingisstaticorcompiletimebinding
[Link]
overridingwhileRedefiningafunctioninaderivedclassis
calledanoverloadedfunction.
[Link]
Overridingisdynamicorruntimebinding
[Link]
overloadingwhileRedefiningafunctioninaderivedclassis
calledasoverriddenfunction.
[Link]
inC++
[Link]
[Link]
[Link]
[Link]
[Link]/an
[Link]
[Link]
[Link]
[Link]
CorrectAnswerstoC++MCQQuestions
1d2b3d4a5b6d7a8b9a10d
11c12d13b14d15c16a17b18b19c20
c
[Link]
functions?
[Link]
nonconstobjects
[Link]
notonnonconstobjects
[Link]
asnonconstobjects
[Link]
[Link]
inheritancerelationship?
[Link]
[Link]
[Link]
[Link]
[Link]
C,whichofthefollowingistrue?
[Link]
[Link]
[Link]
[Link]
[Link]:
[Link]
insertedinafile
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]/writeheadmechanismtopositionitself
overappropriatecylinder
[Link]/write
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
indexitemarelinkedtogethertoformalist.
[Link]
collatingsequencebycontentofthekey
[Link]
[Link]
[Link]/areadvantagesofcellular
partitionedstructure:
[Link]
[Link]
[Link]&b
[Link]
30.*ptr++isequivalenetto:
[Link]++
b.*ptr
c.++*ptr
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]:
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
maintainedapartfromactualdatarecord
[Link]
[Link]
[Link]
[Link]:
[Link]
[Link]
[Link]
[Link]
[Link]:
[Link]/writeheadmechanismtopositionitself
overappropriatecylinder
[Link]
[Link]/write
head
[Link]
[Link]
[Link],entrysequencedstructure
[Link],exitsequencedstructure
[Link],exitsequencedstructure
[Link]
[Link]
betweenobjectsoftheclass?
[Link]
class
[Link]
fromthatclass
[Link]
oftheclass
[Link]
[Link]
oftheloop?
[Link]
[Link]
[Link]
[Link]
[Link]
___________
[Link]
[Link]
[Link]
[Link]
[Link]
ofnamespacefeatureinC++?
[Link]
usedinaprogram
[Link]
[Link]
program.
[Link]
aprogramtoavoidnameclashes.
CorrectAnswerstoC++MCQQuestions
21b22a23b24c25c26d27b28b29a
30c
31d32c33b34a35d36c37c38a39c
40a
[Link]
namespacefeatureinC++?
[Link]
usedinaprogram
[Link]
[Link]
[Link]
programtoavoidnameclashes
[Link]++?
[Link]
[Link]
[Link]
[Link]
[Link]:publicbase1,publicbase2{}isanexample
of
[Link]
[Link]
[Link]
[Link]
[Link]++
language?
[Link]
[Link]
c.C#language
[Link]
[Link]?
[Link]
[Link]
abstractinaclass
[Link]
interface
[Link]++
[Link]?
[Link](function
signaturefollowedby==0)inaclass
[Link]
keywordabstractinaclass
[Link]
[Link]++
[Link]
memory
[Link]
[Link]
[Link]
[Link]
[Link]?
[Link]
[Link]
[Link]
[Link]
[Link]
specifierinC++?
[Link]
[Link]
[Link]
[Link]
[Link]=i++causes
a.ValueofiassignedtoCandtheniincrementedby1
b.itobeincrementedby1andthenvalueofiassignedtoC
[Link]
d.itobeincrementedby1
C++ProgrammingMultipleChoiceQuestionsand
Answers::
[Link]++isequivalentto
a.i=i+i
b.i=i+1
c.i=i1
d.i
[Link],ahexadecimalnumberisrepresentedby
writing
a.x
[Link]
[Link]
d.h
[Link]
abortstheprogram?
[Link]()
[Link]()
[Link]()
[Link]()
[Link]
ofthatsameclass,declarethememberas
[Link]
[Link]
[Link]
[Link]
[Link]+j,ifi,jareintegertypeandixlongtypewould
be
[Link]
[Link]
[Link]
[Link]
[Link]
betweenpointerstorelatedclasses?
a.A.cast_static
b.B.dynamic_cast
c.c.static_cast
d.D.cast_dynamic
[Link]?
a.a.x~(){}
b.B.X(){}~
c.C.X()~{}
d.D.~X(){}
[Link]
[Link]
[Link]
[Link]
[Link]
[Link],whatistheorderin
whichtheconstructersofthoseclassesarecalled
[Link]
[Link]
[Link]
[Link]
[Link]
handlerthatcatchesexceptionofanytype?
[Link](std::exception)
[Link](std::any_exception)
[Link]()
[Link]()
CorrectAnswerstoC++MCQQuestions
41d42d43b44d45a46a47a48c49d
50d
51a52b53d54a55b56c57C58D59a
60a
[Link]
handlerthatcatchesexceptionofanytype?
[Link](std::exception)
[Link](std::any_exception)
[Link]()
[Link]()
[Link],whichloopisexecutedthe
mostnumberoftimes?
[Link]
[Link]
[Link]
[Link]
[Link]
AccessModifier?
[Link]
defaultclassmembersarepublic.
[Link]
defaultclassmembersareprivate.
[Link]
classmembersareprivate.
[Link]
defaultclassmembersareprotected.
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]?
[Link]
objectstoo.
[Link].
[Link]
objectstoo
[Link]
[Link]?
[Link]
objectstoo.
[Link].
[Link]
too
[Link]
[Link]/areavaliditeratortype?
[Link]
[Link]
[Link]
[Link]
[Link]
appliedtovarioustypesofdata?
[Link]
[Link]
[Link]
[Link]
[Link],
synchronizationtakesplace?
[Link]
[Link]
[Link],withmanipulators
[Link]
[Link]
Allocatespaceforarrayinmemory?
[Link]()
[Link]()
[Link]()
[Link]
[Link](%d,80)
[Link]
[Link]
[Link]
[Link]
[Link]
paradigms?
[Link]
[Link](OOP)
[Link]
[Link](AOP)
[Link]
programmingparadigms?
[Link]
[Link](OOP)
[Link]
[Link](AOP)
[Link]
loop,whichofthefollowingmustbeplacedatthebeginning
andtheendingoftheloopblock?
[Link]()
[Link]{}
[Link][].
[Link]<>
[Link]
becomeprivatemembersinchildclass
[Link]
[Link]
[Link]
[Link]
[Link]
iterationsisknown?
[Link]
[Link]
[Link]
[Link]
77.InaClanguage3represents
[Link]
[Link]
[Link]
[Link]
[Link]
implementingC++?
a.C++programsaredirectlycompiledintonativecodebya
compiler
b.C++programsarefirstcompiledtointermediatecodebya
compilerandthenexecutedbyavirtualmachine
c.C++programsareinterpretedbyaninterpreter
[Link]++editordirectlycompilesandexecutestheprogram
[Link]
std::auto_ptr?
a.
b.
c.
d.
[Link]
nonmemberoperator?
#NAME?
b.()(functioncalloperator)
c.[.(arrayaccessoperator)
d.+(additionoperator)
CorrectAnswerstoC++MCQQuestions
61c62c63b64c65b66b67a68d69b
70d
71a72a73c74c75b76c77a78c79a80
c
[Link]
argumentfornonstaticmemberfunctions?
[Link]
[Link]::auto_ptrpointer
[Link]
[Link]
[Link]?
a..(dotormemberaccessoperator)
b.&(addressofoperator)
[Link]
d.?:(conditionaloperator)
[Link]?
#NAME?
b.==(equalityoperator)
c.>(rowoperator)
d.::(coperesolutionoperator)
[Link]
memberfunctionsofaclassoutsidetheclass?
a.::
b.?
c.
d.%
[Link]
inpreprocessordirectives
a.#ifdef
b.#ifundef
c.#endif
d.#elif
[Link]
C++.
[Link]::bad_creat
[Link]::bad_alloc
[Link]::bad_cast
[Link]::bad_typeid
[Link]
ofthatsameclass,declarethememberas
[Link]
[Link]
[Link]
[Link]
[Link],
synchronizationtakesplace?
[Link]
[Link]
[Link],withmanipulators
[Link]
[Link]
Allocatespaceforarrayinmemory?
[Link]()
[Link]()
[Link]()
[Link]
[Link]
inpreprocessordirectives
a.#ifdef
b.#ifundef
c.#endif
d.#elif
[Link]=(b=5,b+5)is
[Link]
[Link]
c.5
d.10
[Link]
thecontentsof2variablesis:
a.1
b.2
c.3
d.0
[Link].
[Link]
[Link]
95.C++providesfacilitytospecifythatthecompilershould
matchfunctioncallswiththecorrectdefinitionattherun
[Link]
[Link]
[Link]
[Link]
int
main(){cout<<HelloWorld!return0}
[Link]
[Link]
c.0
[Link]!
[Link]
Class1&test(Class1obj)
{
Class1*ptr=newClass1()
returnptr
}
a.objectofClass1
[Link]
c.referenceofClass1
[Link]
[Link]
{
inta=5
intb=10
cout<<(a>b?a:b)
}
a.5
b.10
[Link]
[Link]
[Link]
inta=10
voidmain()
{
inta=20
cout<<a<<::a
}
[Link]
b.1020
c.2010
d.2020
[Link]
classExample{
public:inta,b,c
Example(){a=b=c=1}//Constructor1
Example(inta){a=ab=c=1}//Constructor2
Example(inta,intb){a=ab=bc=1}//Constructor3
Example(inta,intb,intc){a=ab=bc=c}//Constructor4
}
Intheaboveexampleofconstructoroverloading,the
followingstatementwillcallwhichconstructor
Exampleobj=newExample(1,2,3)
a.Constructor2
b.Constructor4
c.Constrcutor1
[Link]
CorrectAnswerstoC++MCQQuestions
81d82d83b84d85a86b87a88b89d
90a
91b92d93d94a95b96b97b98b99c
100b
PostedinC++ProgrammingQuestionsandAnswers
30TOPCOMPILERDESIGN 100TOPCOMPUTER
VIVAQuestionsandAnswers NETWORKSMultipleChoice
QuestionsandAnswers
4THOUGHTSON100TOPC++PROGRAMMING
MULTIPLECHOICEQUESTIONSANDANSWERS
habtamu
SEPTEMBER7,2016AT1:31PM
veryexcellent!!!!
REPLY
yunusolaide
AUGUST15,2016AT10:54AM
thiswillhelpme
REPLY
aditya
JULY8,2016AT4:54PM
[Link]
REPLY
aditya
JULY8,2016AT4:53PM
sirpleasesendmepdfofmcqoncomputer
[Link]
REPLY
LEAVEAREPLY
[Link]*
Comment
Name*
Email*
Website
PostComment
Engineeringinterviewquestions,multiplechoicequestions,objectivetypequestions,seminor
topics,labvivaquestionsandanswers,onlinequiztestpdffreedownloadforfreshers.
Terms&Conditions|PrivacyPolicy|Contactus|Aboutus