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 / anvesh
there is no include file iostream for cout
immproper ending for classes ';'
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is file in c language?
What is clrscr in c?
What do you mean by scope of a variable in c?
What is string concatenation in c?
What is a ternary operator in c?
What is methods in c?
The difference between printf and fprintf is ?
What is calloc malloc realloc in c?
Explain zero based addressing.
What is integer constants?
What is a far pointer in c?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
What is infinite loop?
Implement bit Array in C.