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 the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
What is structure and union in c?
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
write a c program for swapping two strings using pointer
For what purpose null pointer used?
What is the difference between fread buffer() and fwrite buffer()?
int far *near * p; means
Tell me is null always defined as 0(zero)?
What is typeof in c?
What are structural members?
What is sorting in c plus plus?
Can you please compare array with pointer?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
Why is extern used in c?
Where are the auto variables stored?