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
Is null always equal to 0(zero)?
What is putchar() function?
Explain continue keyword in c
int i=10; printf("%d %d %d", i, i=20, i);
What is a static variable in c?
Explain the properties of union.
How do you define structure?
Why do we need arrays in c?
to find the closest pair
What is the significance of c program algorithms?
What is the right type to use for boolean values in c? Is there a standard type?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
What's a good way to check for "close enough" floating-point equality?
What does sizeof return c?
What is the mean of function?