AdminLTELogo

MCQs List

Code Question Option A Option B Option C Option D Answer
CS304 Only Tangible Things Can Be Chosen As An Object True False Na Na B
CS304 Operator Overloading Is Making C++ Operators Work With Objects Giving C++ Operators More Than They Can Handle Giving New Meanings To Existing Class Members Making New C++ Operators A
CS304 Outside World Can Access Only __________ Members Of A Class Using Its Object Public Private Protected No Member Is Accessible A
CS304 Public Inheritance Represents “Is A” Relationship -Has A? Relationship -Is Special Kind Of? Relationship None Of These Options A
CS304 Public Methods Of Base Class Can --------- Be Accessed In Its Derived Class Directly Inderectly Simultaniously Non Of The Given A
CS304 Remain In Memory Even When All Objects Of A Class Have Been Destroyed Static Variables Instance Variable Primitive Variables None Of Given A
CS304 Static Variables Act Like A Global Variable In The Context Or Scope Of The Class True False Na Na A
CS304 Suppose Obj1 And Obj2 Are Two Objects Of A User Defined Class A. An + Operator Is Overloaded To Add Obj1 And Obj2 Using The Function Call Obj1+Obj2. Identify The Correct Function Prototype Against The Given Call? A Operator + ( A &Obj); Int + Operator(); Int Operator (Plus) (); A Operator(A &Obj3); C
CS304 Suppose That The Test Class Does Not Have An Overloaded Assignment Operator. What Happens When An Assignment A=B; Is Given For Two Test Objects A And B? The Automatic Assignment Operator Is Used The Copy Constructor Is Used Compiler Error Run-Time Error C
CS304 Suppose There Is An Object Of Type Person Which Of The Following Can Be Considered As One Of Its Attributes Name Age Work() Both Name And Age D
CS304 Suppose We Have Two Derived Classes From A Single Class Can We Write A Method With Same Name In Both These Derived Classes? Choose The Best Option No Only If The Two Classes Have The Same Name Only If The Main Program Does Not Declare Both Kinds Yes B
CS304 Suppose You Create An Uninitialized Vector As Follows: Vector<Int> Evec; After Adding The Statement Evec.Push_Back(21); What Will Happen? The Following Statement Will Add An Element To The Start (The Back) Of Evec And Will Initialize It With The Value 21 The Following Statement Will Add An Element To The Center Of Evec And Will Reinitialize It With The Value 21 The Following Statement Will Delete An Element To The End (The Back) Of Evec And Will Reinitialize It With The Value 21 The Following Statement Will Add An Element To The End (The Back) Of Evec And Qinitialize It With The Value 21 D
CS304 Suppose You Create An Uninitialized Vector As Follows: Vector<Int> Evec; After Adding The Statement Evec.Push_Back(21); What Will Happen? The Following Statement Will Add An Element To The Start (The Back) Of Evec And Will Initialize It With The Value 21 The Following Statement Will Add An Element To The Center Of Evec And Will Reinitialize It With The Value 21 The Following Statement Will Delete An Element To The End (The Back) Of Evec And Will Reinitialize It With The Value 21 The Following Statement Will Add An Element To The End (The Back) Of Evec And Initialize It With The Value 21 A
CS304 Template <> Class Vector<Char*> { } This Is An Example Of Partial Specialization True False Na Na B
CS304 Template Functions Use ___________ Than Ordinary Functions Greater Memory Lesser Memory Equal Memory None Of The Given Options B
CS304 The __________ Relationship Indicates That An Object Contains Other Objects ‘Has-A’ ‘Is-A’ ‘Be- None Of Given D
CS304 The >= Operator Can Be Overloaded True False Na Na A
CS304 The >= Operator Cant Be Overloaded True False Na Na B
CS304 The Ability To Derive A Class From More Than One Class Is Called Single Inheritance Encapsulation Multiple Inheritance Polymorphism C
CS304 The Compiler Won‘T Object If You Overload The * Operator To Perform Division True False Na Na A