-
-
Static Polymorphism
What is Static Polymorphism? Give its syntax and simple example.
-
C++ Interface
Is it possible to create an interface in C++? If Yes, how?
-
Static and friend function in a class
Use of static and friend function in a class
-
Inheritance in C++
While doing inheritance in C++, one thing that is not inherited is what?
-
What is out put of C++ code?
cclass base
{
public:
virtual void display(int i = 10)
{
cout -
Classes
Why should you generally pass an object of the class to a friend function as a reference parameter?Choose one answer. a. if the friend function changes the values of the data member(s) b. if the friend function will not change the values of the data member(s) c. It is more efficient to pass the object by reference. d. A and B e. A and C
-
-
-
Function Linkage Mechanism
What is function linkage mechanism? Can inline function be used at run time? Why or why not?
-
Number in words
Write a program that takes an integer and displays the words number of that value. For example,
10->ten
121->one hundred twenty one -
C/C++ black screen opens and closes
While executing a program in C++, it happens the black screen opens and closes automatically without displaying the output(program is correct). How to recover from this situation?
-
-
Function Resolution
Explain the resolution of a function by C ++ complier in the case of function overloading.
-
-
-
-
Unary Postfix Operator Overloading
Which of the following statements accurately describe unary postfix operator++ overloading in C++?A. It can be overloaded with no parameters when the operator function is a class member.B. It can only be overloaded if the operator function is a class member.C. It can be overloaded with one parameter when the operator function is free standing function (not a class member).D. To overload it at least...
-
-
What is encapsulation?
Packaging an object’s variables within its methods is called encapsulation.
C++ Interview Questions
Ans