What is the output of this program?
#include using namespace std; void fun(int x, int y) { x = 20; y = 10; } int main() { int x = 10; fun(x, x); cout << x; return 0; }
In this program, we called by value so the value will not be changed, So the output is 10
What is a template?
View Answer Report Error Discuss
How many kinds of classes are there in c++?
There are two kinds of classes in c++. They are absolute class and concrete class.
How many types of constructor are there in C++?
There are three types of constructor in C++. They are Default constructor, Parameterized constructor, Copy constructor.
What does inheriatance allows you to do?
How many ways of reusing are there in class hierarchy?
Class hierarchies promote reuse in two ways. They are code sharing and interface sharing.
What is meant by pure virtual function?
As the name itself implies, it have to depend on other class only.
Which is also called as abstract class?
Classes that contain at least one pure virtual function are called as abstract base classes.
Which of the following can derived class inherit?