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
Explain what is page thrashing?
What is #include stdlib h?
Why doesnt the call scanf work?
What is register variable in c language?
Explain how do you determine a file’s attributes?
What are header files? What are their uses?
what are the 10 different models of writing an addition program in C language?
What are the scope of static variables?
What does & mean in scanf?
What is the use of function overloading in C?
What is the purpose of clrscr () printf () and getch ()?
Write a program to identify if a given binary tree is balanced or not.
What is extern c used for?
Are the variables argc and argv are local to main?
Can the size of an array be declared at runtime?