C++ Interview
C++ Interview Question and Answers:
21. What do you mean by implicit conversion?
Whenever data types are mixed in an expression then c++ performs the conversion automatically.
Here smaller type is converted to wider type.
Example : in case of integer and float integer is converted into float type.
22. What do you mean by reference variable in c++?
A reference variable provides an alias to a previously defined variable.
Data -type & reference-name = variable name
23. What is multiple inheritance?
A class can inherit properties from more than one class which is known as multiple inheritance.
24. What are virtual functions?
The virtual fuctions must be members of some class.
They cannot be static members.
They are accessed by using object pointers.
A virtual function can be a friend of another class.
25. what is the use of virtual destructor in c++?
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.
No comments:
Post a Comment