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 / pooja sonawane
error.
because, there is no header file.
and no ";" is given after the end of classes.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
using for loop sum 2 number of any 4 digit number in c language
What is difference between far and near pointers?
number of times a digit is present in a number
How is actual parameter different from the formal parameter?
Is fortran faster than c?
What is meant by gets in c?
Why is #define used?
If I have a char * variable pointing to the name of a function ..
Create a simple code fragment that will swap the values of two variables num1 and num2.
Is a house a mass structure?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
Hai what is the different types of versions and their differences
Does free set pointer to null?