C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 42)
42.
In which of the following a virtual call is resolved at the time of compilation?
From inside the destructor.
From inside the constructor.
From inside the main().
Both A and B.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
14 comments Page 1 of 2.

Shilpa said:   1 decade ago
Please explain why?

Ravindra bagale said:   1 decade ago
@Shilpa.

To construct an object, a constructor needs the exact type of the object it is to create. That means compiler has to know the type of object before the creation, that is only possible at compile time.

Mohit said:   1 decade ago
To construct an object, a constructor needs the exact type of the object it is to create. That means compiler has to know the type of object before the creation, that is only possible at compile time.

Similarly we cannot create classes having same name i. e, each class name is unique. Constructor and destructor name is similar to classname.

Anil said:   1 decade ago
To construct an object, a constructor needs the exact type of the object it is to create. That means compiler has to know the type of object before the creation, that is only possible at compile time.

Similarly we cannot create classes having same name i.e., each class name is unique. Constructor and destructor name is similar to classname.

Kola said:   1 decade ago
To construct an object, a constructor needs the exact type of the object it is to create. That means compiler has to know the type of object before the creation, that is only possible at compile time.

Similarly we cannot create classes having same name i.e., each class name is unique. Constructor and destructor name is similar to classname.

Sagar said:   1 decade ago
Please any one clear this point that virtual call resolved at compilation.

Archana said:   1 decade ago
Please explain this word virtual call, what's exactly mean virtual call at compilation.

Pooja Deshmukh said:   1 decade ago
What exactly means the virtual call at the time of compilation?

Priti choubey said:   9 years ago
Can you please explain the question?

Haritha reddy said:   8 years ago
Virtual call at the compilation time means if we want to call the same named function with in the class it possible by only defining the base class as virtual. So we are calling this virtual function at compile time.


Post your comments here:

Your comments will be displayed after verification.