-
What do you mean by binding of data and functions?
Encapsulation.
-
-
C++ program to expand the given string
C++ program to expand the following string
aa2b4c3d
o/p should be :
aabbccccddd -
-
-
-
-
-
What is the need /use of function overloading
Hint FO is mechanism in which two functions r having same name with diff no. of arguments.
-
What is a class?
Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.
-
Write Object into a File
How will you write object into file using file concepts in C++?
-
-
-
-
-
What is polymorphism? Explain with an example?
"Poly" means "many" and "morph" means "form". Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms of object. Example: function overloading, function overriding, virtual functions. Another example can be a plus ‘+’ sign, used for adding two integers or for using it to concatenate two strings.
-
-
What will be the Output?
What will be the result of the following expressions when A = 6, B = 7 and C = 8?
option 1 = D = A + C % B or
option 2 = D = A + B * 5 - C -
C++ Macros Functionality
What is the main thing that C++ macros can do that cannot be done with functions? Give a realistically useful example of something of this kind.
Macros have the distinct advantage of being more efficient than functions, because their corresponding code is inserted directly into your source code at the point where the macro is called. There is no overhead involved in using a macro like... -
Constructor Use
Why the constructor is used?
C++ Interview Questions
Ans