C++ MCQs with answers Page - 135

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. A white space is :

  • (A) blank space
  • (B) new line
  • (C) tab
  • (D) all of the above

A

Admin • 833.24K Points
Coach

Q. Which of the following statements are true in c++?

  • (A) Classes cannot have data as public members.
  • (B) Structures cannot have functions as members.
  • (C) Structures cannot have functions as members.
  • (D) None of these.

A

Admin • 833.24K Points
Coach

Q. What will be the values of x, m and n after the execution of the following statements? int x, m, n; m = 10; n = 15; x = ++m + n++;

  • (A) x=25, m=10, n=15
  • (B) x=26, m=11, n=16
  • (C) x=27, m=11, n=16
  • (D) x=27, m=10, n=15

A

Admin • 833.24K Points
Coach

Q. Consider the following statements: int x = 22,y=15; x = (x>y) ? (x+y) : (x‐y); What will be the value of x after executing these statements?

  • (A) 22
  • (B) 37
  • (C) 7
  • (D) Error. Cannot be executed

A

Admin • 833.24K Points
Coach

Q. ‐‐‐‐‐‐‐ is the actual body of the function

  • (A) Library function
  • (B) Function call
  • (C) Function definition
  • (D) Function declaration

A

Admin • 833.24K Points
Coach

Q. Which of the following is an exit controlled loop?

  • (A) While
  • (B) For
  • (C) Switch
  • (D) do…. While

A

Admin • 833.24K Points
Coach

Q. ‐‐‐‐‐ is a function that is expanded in line when it is invoked.

  • (A) Library function
  • (B) User defined function
  • (C) Inline function
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. The qualifier ‐‐‐‐‐‐ tells the compiler that the function should not modify the argument.

  • (A) Const
  • (B) Static
  • (C) Constant
  • (D) Inline

A

Admin • 833.24K Points
Coach

Q. ‐‐‐‐‐‐ refers to the use of the same thing for different purpose.

  • (A) Function declaration
  • (B) Overloading
  • (C) Function calling
  • (D) Prototyping

A

Admin • 833.24K Points
Coach

Q. The functions declared inside the class is known as ‐‐‐‐‐‐‐‐

  • (A) Data members
  • (B) Library functions
  • (C) Member functions
  • (D) User defined functions

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