C++ Interview Question and Answers : 5
Posted by Pritam |  at 22:05
| 21. | What is the difference between macro and iniine? |
| Inline follows strict parameter type checking, macros do not.
Macros are always expanded by preprocessor, whereas compiler may or may not replace the inline definitions. |
| 22. | How variable declaration in c++ differs that in c? |
| C requires all the variables to be declared at the beginning of a scope but in c++ we can declare variables anywhere in the scope. This makes the programmer easier to understand because the variables are declared in the context of their use. |
| 23. | What is multiple inheritance? |
| A class can inherit properties from more than one class which is known as multiple inheritance. |
| 24. | 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.
|
| 25. | 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 |
About the Author
Write admin description here..
Get Updates
Subscribe to our e-mail newsletter to receive updates.
0 comments:
We Will Appreciate Your Comment As Complement