C++ Questions

Q:

What do you mean by multiple inheritance in C++ ?

Answer

Multiple inheritance is a feature in C++ by which one class can be of different types. Say class teaching Assistant is inherited from two classes say teacher and Student.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2172
Q:

Define Structure in C++.?

Answer

The C++ programming technique allows defining user defined datatypes through structure. The


syntax to declare structure is as follows:


struct student


{


char name[100]


char address[250]


};

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2112
Q:

what is the use of virtual destructor in c++?

Answer

A destructor is automatically called when the object is destroyed. A virtual destructor in C++ is used primarily to prevent resource leaks by performing a clean-up of the object.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2024