C++ MCQ Questions and Answers

Take Exam

C++ MCQ questions and answers are vital for students preparing for software development and IT placement exams like TCS, Infosys, and Tech Mahindra. These questions test your understanding of core concepts such as classes, objects, inheritance, polymorphism, and templates. Practicing C++ programming MCQs with detailed explanations helps strengthen coding logic and syntax understanding. This topic is ideal for candidates aiming to improve their performance in programming interview questions with answers and campus recruitment tests.

C++ MCQ

Showing 10 of 93 questions

81. Overloaded functions are

  • Very long functions that can hardly run
  • One function containing another one or more functions inside it.
  • Two or more functions with the same name but different number of parameters or type.
  • None of above
Show Answer Report

82. Functions can be declared with default values in parameters. We use default keyword to specify the value of such parameters.

  • TRUE
  • FALSE
Show Answer Report

83. Examine the following program and determine the output #include <iostream> using namespace std; int operate (int a, int b) {                 return (a * b); } float operate (float a, float b) {                 return (a/b); } int main() {                 int x=5, y=2;                 float n=5.0, m=2.0;                 cout << operate(x,y) <<"\t"; cout << operate (n,m); return 0; }

  • 10.0 5.0
  • 5.0 2.5
  • 10.0 5
  • 10 2.5
Show Answer Report

84. A function can not be overloaded only by its return type.

  • TRUE
  • FALSE
Show Answer Report

85. A function can be overloaded with a different return type if it has all the parameters same.

  • TRUE
  • FALSE
Show Answer Report

86. Inline functions involves some additional overhead in running time.

  • TRUE
  • FALSE
Show Answer Report

87. A function that calls itself for its processing is known as

  • Inline Function
  • Nested Function
  • Overloaded Function
  • Recursive Function
Show Answer Report

88. We declare a function with ______ if it does not have any return type

  • long
  • double
  • void
  • int
Show Answer Report

89. Arguments of a functions are separated with

  • comma (,)
  • semicolon (Wink
  • colon (Smile
  • None of these
Show Answer Report

90. Variables inside parenthesis of functions declarations have _____ level access.

  • Local
  • Global
  • Module
  • Universal
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test