What is the output of this program?
#include using namespace std; struct sec { int a; char b; }; int main() { struct sec s ={25,50}; struct sec *ps =(struct sec *)&s; cout << ps->a << ps->b; return 0; }
In this program, We are dividing the values of a and b, printing it.
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?