Explore topic-wise MCQs in Cpp Interview.

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

1.

At which time does the static_cast can be applied?

A. Compile-time construct
B. Runtime construct
C. Both Compile-time & Runtime construct
D. Runtime deconstruct
Answer» B. Runtime construct
2.

What is meant by type_info?

A. Used to hold the type information returned by the typeid operator
B. Used to hold the type information returned by the dynamic_cast
C. Used to hold the type information returned by the static_cast
D. Used to hold the type information returned by the static_id
Answer» B. Used to hold the type information returned by the dynamic_cast
3.

What is the Run-Time Type Information?

A. Information about an object’s data type at runtime
B. Information about the variables
C. Information about the given block
D. Information about the functions
Answer» B. Information about the variables
4.

Consider the following table:A.Activation recordp.Linking loaderB.Location counterq.Garbage collectionC.Reference countsr.Subroutine callD.Address relocations.AssemblerMatching A, B, C, D in the same order gives:

A. p, q, r, s
B. q, r, s, p
C. r, s, q, p
D. r, s, p, q
Answer» D. r, s, p, q
5.

Heap allocation is required for languages that :

A. use dynamic scope rules
B. support dynamic data structures
C. support recursion
D. support recursion and dynamic data structures
Answer» C. support recursion
6.

INT?$

A. float
B. double
C. object is NULL
Answer» B. double
7.

base*

A. derived*
B. 4base and 7derived
C. none of the mentioned
Answer» D.
8.

Pi

A. i
B. Both pi & i
C. f
Answer» D.
9.

Null pointer on first type-cast

A. Null pointer on second type-cast
B. Exception
C. None of the mentioned
Answer» C. None of the mentioned
10.

To which type of class, We can apply RTTI?

A. Encapsulation
B. Polymorphic
C. Derived
D. None of the mentioned
Answer» D. None of the mentioned
11.

Which operators are part of RTTI?

A. dynamic_cast()
B. typeid
C. both dynamic_cast() & typeid
D. none of the mentioned
Answer» B. typeid