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 ?

  • A) Entry control
  • B) Exit control
  • C) Per tested
  • D) None

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

  • A) ||
  • B) &&
  • C) &
  • D) !

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

  • A) returns nothing
  • B) has no body
  • C) is used in base class
  • D) None

”Q.4

  • A) ”{}”
  • B) ”()”
  • C) ”[
” 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?

  • A) address of a variable
  • B) a variable for storing address
  • C) Indication of the variable to be accessed next
  • D) None

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

  • A) &&
  • B) *
  • C) $
  • D) &

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

  • A) for loop
  • B) do while loop
  • C) while loop
  • D) None

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

  • A) ;
  • B) ::
  • C) :
  • D) None

Q.9 A relational operator:

  • A) Assigns operand to another
  • B) Compares two operands
  • C) logically combines two operators
  • D) None

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

  • A) Program in which it occurs
  • B) Function in which it occurs
  • C) loop in which it occurs
  • D) None

Q.11 goto is a:

  • A) variable
  • B) label
  • C) operator
  • D) Function

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

  • A) Member Variables
  • B) Member Function
  • C) Class Function
  • D) None

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

  • A) Bitwise operator
  • B) Conditional operator
  • C) logical operator
  • D) None

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

  • A) Function
  • B) Class
  • C) Object
  • D) Operator Function

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

  • A) 1
  • B) 2
  • C) 3
  • D) 4

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

  • A) using inheritance
  • B) using Templates
  • C) using virtual function
  • D) None

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

  • A) Private
  • B) Protected
  • C) Both A & B
  • D) None

”Q.18

  • A) ”cout”
  • B) ”cin”
  • C) ”print”
  • D) ”None”

Q.19 C++ uses:

  • A) Top-Down approach
  • B) Bottom-up approach
  • C) Left-left
  • D) Right-Right

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

  • A) Abstract class
  • B) Virtual class
  • C) Singleton class
  • D) None

Scroll to Top