C++ MCQs with answers Page - 111

Here, you will find a collection of MCQ questions on C++. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. we can manipulate data stored in other variables ________ with pointer variables.

  • (A) never
  • (B) seldom
  • (C) indirectly
  • (D) both a and b

A

Admin • 833.24K Points
Coach

Q. Which of the following is true about templates?
1) Template is a feature of C++ that allows us to write one code for different data types.
2) We can write one function that can be used for all data types including user defined types. Like sort(), max(), min(), ..etc.
3) We can write one class or struct that can be used for all data types including user defined types. Like Linked List, Stack, Queue,..etc.
4) Template is an example of compile time polymorphism.

  • (A) 1 and 2
  • (B) 1, 2 and 3
  • (C) 1, 2 and 4
  • (D) 1, 2, 3 and 4

A

Admin • 833.24K Points
Coach

Q. Which of the following is incorrect in C++?
(1)When we write overloaded function we must code the function for each usage.
(2)When we write function template we code the function only once.
(3)It is difficult to debug macros
(4)Templates are more efficient than macros

  • (A) (1) and (2)
  • (B) (1), (2) and (3)
  • (C) (3) and (4)
  • (D) All are correct.

A

Admin • 833.24K Points
Coach

Q. Which data type is used to represent the absence of parameters?

  • (A) int
  • (B) short
  • (C) void
  • (D) float

A

Admin • 833.24K Points
Coach

Q. What does an escape code represent?

  • (A) alert
  • (B) backslash
  • (C) tab
  • (D) form feed

A

Admin • 833.24K Points
Coach

Q. Which type is best suited to represent the logical values?

  • (A) integer
  • (B) Boolean
  • (C) character
  • (D) all of the mentioned

A

Admin • 833.24K Points
Coach

Q. Identify the user-defined types from the following?

  • (A) enumeration
  • (B) classes
  • (C) both enumeration and classes
  • (D) int

A

Admin • 833.24K Points
Coach

Q. The value 132.54 can be represented using which data type?

  • (A) double
  • (B) void
  • (C) int
  • (D) bool

A

Admin • 833.24K Points
Coach

Q. When a language has the capability to produce new data type mean, it can be called as …...

  • (A) overloaded
  • (B) extensible
  • (C) encapsulated
  • (D) reprehensible

A

Admin • 833.24K Points
Coach

Q. Choose the operator which cannot be overloaded.

  • (A) /
  • (B) ( )
  • (C) ::
  • (D) %

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ