C++ MCQs with answers Page - 39

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. What are bitwise operators?

  • (A) &
  • (B) ^
  • (C) !
  • (D) All of these

A

Admin • 833.24K Points
Coach

Q. The constant that should not have fractional part is ___

  • (A) Exponent
  • (B) Integer
  • (C) Double
  • (D) Float

A

Admin • 833.24K Points
Coach

Q. What is the other name for variable?

  • (A) Constant
  • (B) Identifier
  • (C) Visual
  • (D) While

A

Admin • 833.24K Points
Coach

Q. ____ constant is a signed real number.

  • (A) Floating point
  • (B) Integer
  • (C) String
  • (D) Char

A

Admin • 833.24K Points
Coach

Q. How many operators are classified in C++?

  • (A) 15
  • (B) 14
  • (C) 13
  • (D) 11

A

Admin • 833.24K Points
Coach

Q. ____ is the C increment Operator in C++.

  • (A) --
  • (B) *+
  • (C) +*
  • (D) ++

A

Admin • 833.24K Points
Coach

Q. What is the output of the following C++ code?

Code:
#include <iostream>
using namespace std;
double & getVal()
{
  double v = 12.99;
  double &val = v;
  return val;
}
int main()
{
  double v = getVal();
  cout << "The value = " << v;
  return 0;
}
  • (A) 12
  • (B) 12.99
  • (C) Compilation error
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. Which header file is used to pass an unlimited number of arguments to a function?

  • (A) string.h
  • (B) stdarg.h
  • (C) stdlib.h
  • (D) All of these

A

Admin • 833.24K Points
Coach

Q. Which of the following statements allows you to overload a function in C++?

  • (A) Type and number of arguments
  • (B) Type
  • (C) Number of arguments
  • (D) None of the above

A

Admin • 833.24K Points
Coach

Q. What is the output of the following C++ code?

Code:
#include <iostream>
using namespace std;
void display(double  f)
{
  cout << f << endl;
}
void display(int i)
{
  cout << i << endl;
}
int main(void)
{
  display(3);
  display(28.99);
  return 0;
}
  • (A) 28.99
  • (B) 3
  • (C) Both A and B are true.
  • (D) None of these

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