C++ MCQs with answers Page - 47

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. Which punctuator is used to group a set of C++ statements?

  • (A) /
  • (B) ()
  • (C) []
  • (D) {}

A

Admin • 833.24K Points
Coach

Q. Redirection redirects

  • (A) A file from a device to a stream
  • (B) A stream from a file to the screen
  • (C) A device from the screen to a file
  • (D) Screen from a device to a stream

A

Admin • 833.24K Points
Coach

Q. Memorizing the new items used in C++ is

  • (A) Something you can return to later
  • (B) The key to wealth and success
  • (C) Completely irrelevant
  • (D) Critically important

A

Admin • 833.24K Points
Coach

Q. The scope resolution operator usually

  • (A) Limits the visibility of variables to a certain function
  • (B) Tells what base class is derived from
  • (C) Specifies a particular class
  • (D) Providing a useful conceptual frame work

A

Admin • 833.24K Points
Coach

Q. An enumerated data type brings together a group of

  • (A) Constant values, integers with user defined names
  • (B) Items of different data type
  • (C) Related data type
  • (D) All of these

A

Admin • 833.24K Points
Coach

Q. A variable defined within a block is visible

  • (A) Throughout the function
  • (B) From the point of definition on ward in the program
  • (C) From the point of definition on ward in the function
  • (D) From the point of definition onward in the block

A

Admin • 833.24K Points
Coach

Q. The member function can always access the data in

  • (A) The object of which is a member
  • (B) The class of which it is member
  • (C) The public part of its class
  • (D) Any object of the class of which it is a member

A

Admin • 833.24K Points
Coach

Q. In a stock, the data item placed on the stack first is

  • (A) The last data item to be removed
  • (B) The first data item to be removed
  • (C) Not given as index number
  • (D) Given as index zero

A

Admin • 833.24K Points
Coach

Q. Breaking a program into several files is desirable because

  • (A) A program can be divided functionally
  • (B) Some files don’t need to be recompiled each time
  • (C) Each programmer can work on a separate file
  • (D) Files can be marketed in object form

A

Admin • 833.24K Points
Coach

Q. Copy constructor is invoked when a/an

  • (A) Function returns by value
  • (B) Function returns for reference
  • (C) Argument is passed by reference
  • (D) Argument is passed by value

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