JOIN ADRE 2.0 Telegram Group

C++ MCQs | C Plus Plus Programming Language Questions and Answers | Multiple Choice Questions and Answers

Questions
1. OOP language supports object based features, inheritance and ______________
  • [A] Encapsulation.
  • [B} Polymorphism
  • [C} Object identity.
  • [A] Functions.

Answer: Option [B]

2. ___________ is one of the ways to achieve polymorphism.
  • [A] Inheritance
  • [B} Data overloading
  • [C} Operator overloading.
  • [A] Message binding.

Answer: Option [C]

Advertisement
Article and Schedule Quiz Start Test!

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

3. A _______________ is an instance of class
  • [A] code
  • [B} object
  • [C} variable
  • [A] pointer

Answer: Option [B]

4. One of the methods to stop the execution of the function is by calling the standard ________ function
  • [A] goto.
  • [B} jump.
  • [C} stop.
  • [A] exit

Answer: Option [D]

5. _________ is a relationship between classes.
  • [A] Polymorphism
  • [B} Inheritance
  • [C} Overloading
  • [A] Overriding

Answer: Option [B]

6. A continue statement causes execution to skip to ____.
  • [A] the fZirst statement after the loop.
  • [B} the statement following the continue statement.
  • [C} The return 0; statement.
  • [A] the next iteration of the loop.

Answer: Option [D]

7. A ________ converts from an object of the type of the constructor's parameter to an object of the class.
  • [A] conversion function.
  • [B} member function.
  • [C} class conversion.
  • [A] conversion constructors.

Answer: Option [D]

8. Variables that are declared, but not initialized, contain ________
  • [A] blank spaces.
  • [B} zeros.
  • [C} "garbage" values.
  • [A] nothing - they are empty.

Answer: Option [C]

9. When a data type must contain decimal numbers, assign the ______ type
  • [A] int
  • [B} char
  • [C} double
  • [A] long int

Answer: Option [C]

10. A structure defines a ________type.
  • [A] class
  • [B} pointers
  • [C} arrays
  • [A] variables

Answer: Option [A]

11. _____ operator returns the address of the identifier.
  • [A] &.
  • [B} *.
  • [C} &&.
  • [A] !.

Answer: Option [A]

12. ________ is a stream connected to standard output.
  • [A] cin.
  • [B} gets
  • [C} out
  • [A] count

Answer: Option [D]

ADRE 2.0 FULL LENGTH MOCK TEST

Take Mock Tests

Missiles Mock Test Start Test!
SSC MTS Mock Test Start Test
IBPS CLERK MOCK TEST Start Test
SSC MTS 2022 JULY 26 Shift 1 (ENGLISH) Start Test!
SSC GD Previous Year Paper 2021 Nov 17 Shift - I (Hindi) Start Test!
SSC CGL Tier - 1 PYP 2022 April 21 Shift- 1 (ENGLISH) Start Test!
MPSC PAPER I MOCK TEST 1 (ENGLISH) Start Test!
IB Security Assistant Mock test 1 (english) Start Test!
UP POLICE CONSTABLE MOCK TEST 1 Start Test!
DELHI POLICE CONSTABLE MOCK TEST 1 (HINDI) Start Test!
Advertisement
Assam Direct Recruitment Test Series