C++ MCQs with answers Page - 133

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. The continue statement

  • (A) resumes the program if it is hanged
  • (B) resumes the program if it was break was applied
  • (C) skips the rest of the loop in current iteration
  • (D) all of above

A

Admin • 833.24K Points
Coach

Q. Find out the error in following block of code. If (x = 100) Cout << “x is 100”;

  • (A) 100 should be enclosed in quotations
  • (B) There is no semicolon at the end of first line
  • (C) Equals to operator mistake
  • (D) Variable x should not be inside quotation

A

Admin • 833.24K Points
Coach

Q. What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run?

  • (A) 10
  • (B) 9
  • (C) 0
  • (D) 1

A

Admin • 833.24K Points
Coach

Q. When following piece of code is executed, what happens?b = 3; a = b++;

  • (A) a contains 3 and b contains 4
  • (B) a contains 4 and b contains 4
  • (C) a contains 4 and b contains 3
  • (D) a contains 3 and b contains 3

A

Admin • 833.24K Points
Coach

Q. In case of arguments passed by values when calling a function such as z=addidion(x,y),

  • (A) Any modifications to the variables x & y from inside the function will not have any effect outside the function.
  • (B) The variables x and y will be updated when any modification is done in the function
  • (C) The variables x and y are passed to the function addition
  • (D) None of above are valid.

A

Admin • 833.24K Points
Coach

Q. How many times is a do while loop guaranteed to loop?

  • (A) 0
  • (B) Infinitely
  • (C) 1
  • (D) variable

A

Admin • 833.24K Points
Coach

Q. Which of the following is not a valid relational operator?

  • (A) ==
  • (B) =>
  • (C) >=
  • (D) >=

A

Admin • 833.24K Points
Coach

Q. The result of a Relational operation is always

  • (A) either True or False
  • (B) is less than or is more than
  • (C) is equal or less or more
  • (D) All of these

A

Admin • 833.24K Points
Coach

Q. A ‐‐‐‐‐‐‐‐ is a memory portion of memory to store a determined value.

  • (A) Constant
  • (B) Variable
  • (C) Keyword
  • (D) Separators

A

Admin • 833.24K Points
Coach

Q. An identifier may ‐‐‐‐‐‐‐‐

  • (A) Strings, that varies at program execution.
  • (B) Those numbers, that is frequently required in programs.
  • (C) The name of a variable.
  • (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