C++ MCQ Questions and Answers
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
82. Functions can be declared with default values in parameters. We use default keyword to specify the value of such parameters.
- TRUE
- FALSE
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
85. A function can be overloaded with a different return type if it has all the parameters same.
- TRUE
- FALSE
86. Inline functions involves some additional overhead in running time.
- TRUE
- FALSE
87. A function that calls itself for its processing is known as
- Inline Function
- Nested Function
- Overloaded Function
- Recursive Function
88. We declare a function with ______ if it does not have any return type
- long
- double
- void
- int
89. Arguments of a functions are separated with
- comma (,)
- semicolon (Wink
- colon (Smile
- None of these
90. Variables inside parenthesis of functions declarations have _____ level access.
- Local
- Global
- Module
- Universal