C++ Language INTERVIEW QUESTION & ANSWERS
31. |
What is function overloading? |
|
Function Overloading more than one method with the same name but different type of parameters and/or number of parameters can be defined. Depending on the actual number and/or static type of the parameters used, the compiler will resolve the call to the correct method. |
32. |
What are the types of polymorphism? |
|
Polymorphism can be broadly classified as - Compile time polymorphism
- Run time polymorphism
|
33. |
What is the difference between compile time and run time polymorphism? |
|
Function overloading, operator overloading,and parametric types (templates in C++ or generics in Java) are done at compile time. Dynamic binding (virtual functions) is runtime polymorphism. |
34. |
What is the difference between an identifier and a keyword? |
|
Identifier : - These are the fundamental building blocks of a program and are used to give names to variables, functions, arrays, objects, classes etc.
Keyword : -
These words are reserved to do specific tasks and must not be used as normal identifier names.
|
35. |
What is meant by type conversion? |
|
The process in which one pre defined type of expressions is converted into another type is called conversion. |