what is out put of the following code?
#include
class Base
{
Base()
{
cout<<"constructor base";
}
~Base()
{
cout<<"destructor base";
}
}
class Derived:public Base
{
Derived()
{
cout<<"constructor derived";
}
~Derived()
{
cout<<"destructor derived";
}
}
void main()
{
Base *var=new Derived();
delete var;
}
Answer Posted / pooja sonawane
error.
because, there is no header file.
and no ";" is given after the end of classes.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is a built-in function in C?
What is the scope of static variable in c?
Is a house a shell structure?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
What is wrong with this initialization?
How can you restore a redirected standard stream?
string reverse using recursion
Can we change the value of #define in c?
How many keywords (reserve words) are in c?
What is meant by errors and debugging?
given post order,in order construct the corresponding binary tree
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
what is recursion in C
What is the difference between printf and scanf in c?
What is abstract data structure in c?