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 an array in c?
Can we access the array using a pointer in c language?
Why we not create function inside function.
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
What is an auto keyword in c?
Are comments included during the compilation stage and placed in the EXE file as well?
What is function pointer c?
What is preprocessor with example?
What is the difference between NULL and NUL?
When should the volatile modifier be used?
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
How pointers are declared?
Why is struct padding needed?
Define Spanning-Tree Protocol (STP)
What is the g value paradox?