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
Differentiate Source Codes from Object Codes
What is the difference between fread buffer() and fwrite buffer()?
Differentiate between the expression “++a” and “a++”?
What does printf does?
Write a program to generate random numbers in c?
What is the use of getchar functions?
What are the different types of control structures?
what do the 'c' and 'v' in argc and argv stand for?
What is unsigned int in c?
C language questions for civil engineering
Explain the properties of union. What is the size of a union variable
What is the usage of the pointer in c?
Why c is known as a mother language?
c language interview questions & answer
What does main () mean in c?