C++ Programming MCQs SET-2

Hey Guys , Welcome to CSE Study247, This page provides you with C++ Programming MCQs SET-2 which is useful for Semester and competitive exams.

Q.1 do while loop is called as ?



  • Entry control


  • Exit control


  • Per tested


  • None

Q.2 Which of the following is logical AND Operator?



  • ||


  • &&


  • &


  • !

Q.3 A pure virtual function is a virtual function that?



  • returns nothing


  • has no body


  • is used in base class


  • None

Q.4 Which of the following is a subscript operator?



  • {}


  • ()

” d=”None” correct=”c” ans=”The square brackets [ ] are the subscript operator, primarily used to access elements of an array.”]

Q.5 A pointer is?



  • address of a variable


  • a variable for storing address


  • Indication of the variable to be accessed next


  • None

Q.6 Which of the following is the address of operator?



  • &&


  • *


  • $


  • &

Q.7 Which looping is best used when we know the number of iterations?



  • for loop


  • do while loop


  • while loop


  • None

Q.8 Which of the following is the scope resolution operator?



  • ;


  • ::


  • :


  • None

Q.9 A relational operator:



  • Assigns operand to another


  • Compares two operands


  • logically combines two operators


  • None

Q.10 The library function exit() causes an exit from:



  • Program in which it occurs


  • Function in which it occurs


  • loop in which it occurs


  • None

Q.11 goto is a:



  • variable


  • label


  • operator


  • Function

Q.12 What is the other name used for functions inside a class?



  • Member Variables


  • Member Function


  • Class Function


  • None

Q.13 if else statement can be replaced by which operator?



  • Bitwise operator


  • Conditional operator


  • logical operator


  • None

Q.14 Which of the following cannot be a friend?



  • Function


  • Class


  • Object


  • Operator Function

Q.15 How many types of polymorphism are there in C++?



  • 1


  • 2


  • 3


  • 4

Q.16 How compile time polymorphism is implemented in C++?



  • using inheritance


  • using Templates


  • using virtual function


  • None

Q.17 Which members are inherited but not accessible in any case?



  • Private


  • Protected


  • Both A & B


  • None

Q.18 Which of the following is C++ equivalent for scanf()?



  • cout


  • cin


  • print


  • None

Q.19 C++ uses:



  • Top-Down approach


  • Bottom-up approach


  • Left-left


  • Right-Right

Q.20 Which of the following class allows to declare only one object of it?



  • Abstract class


  • Virtual class


  • Singleton class


  • None

Scroll to Top