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
Can you add pointers together? Why would you?
What do you mean by recursion in c?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
How to define structures? ·
Is flag a keyword in c?
What are linked lists in c?
Why should I prototype a function?
Why functions are used in c?
What is the importance of c in your views?
Why c is called top down?
What is the difference between #include and #include 'file' ?
If null and 0 are equivalent as null pointer constants, which should I use?
How will you divide two numbers in a MACRO?
Explain what are header files and explain what are its uses in c programming?
What is a built-in function in C?