Explore topic-wise MCQs in C.

This section includes 12 Mcqs, each offering curated multiple-choice questions to sharpen your C knowledge and support exam preparation. Choose a topic below to get started.

1.

WHICH_OF_THE_FOLLOWING_STATEMENTS_IS_CORRECT??$

A. Each derived class does not have its own version of a virtual method
B. If a derived class does not have its own version of virtual method then one in base class is used
C. By default methods are virtual
D. All of the mentioned
Answer» D. All of the mentioned
2.

WHICH_AMONG_THE_FOLLOWING_CAN‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚ÀÖ¬•T_BE_USED_FOR_POLYMORPHISM??$#

A. Static member functions
B. Member functions overloading
C. Predefined operator overloading
D. Constructor overloading
Answer» B. Member functions overloading
3.

Its base classIts derived class$

A. Its base class Its derived class
B. Its derived classIts base class
C. Its derived class Its base class
Answer» B. Its derived classIts base class
4.

1 1 1$

A. 1 2 3
B. ‘1’ ‘1’ ‘1’
C. An exception is thrown
Answer» C. An exception is thrown
5.

Demo’s check Derived’s check$

A. Demo’s check Demo’s check
B. Derived’s check Demo’s check
C. Syntax error
Answer» B. Derived‚Äö√Ñ√∂‚àö√ë‚àö¬•s check Demo‚Äö√Ñ√∂‚àö√ë‚àö¬•s check
6.

Which_among_the_following_can_show_polymorphism?

A. Overloading ||
B. Overloading +=
C. Overloading <<
D. Overloading &&
Answer» B. Overloading +=
7.

f1() of derived class get execute?

A. of derived class get executed
B. of base class get executed
C. f1() of base class get executed
D. of derived class get executed
Answer» E.
8.

A class in which one or more methods are only implemented to raise an exception is called an abstract class. True or False?

A. True
B. False
Answer» C.
9.

The subject class version of a() method gets called using sample class reference which holds subject class object

A. subject class hides a() method of base class
B. The code replaces the subject class version of a() with its math class version
C. None of the mentioned
Answer» D.
10.

Only class student can show polymorphism

A. Only class student and topper together can show polymorphism
B. All class student, topper and average together can show polymorphism
C. Class failed should also inherit class student for this code to work for polymorphism
Answer» C. Class failed should also inherit class student for this code to work for polymorphism
11.

Which of the following keyword is used to change data and behavior of a base class by replacing a member of the base class with a new derived member?

A. Overloads
B. Overrides
C. new
D. base
Answer» E.
12.

100 150 1000

A. 1000 150 1000
B. 100 150 1000
C. 100 150 100
Answer» D.