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
Differentiate between the expression “++a” and “a++”?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
Explain what is page thrashing?
Is there a built-in function in C that can be used for sorting data?
How can I do graphics in c?
What is wrong in this statement? scanf(“%d”,whatnumber);
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
How can you determine the size of an allocated portion of memory?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
Explain how can I read and write comma-delimited text?
Differentiate between full, complete & perfect binary trees.
How can I find the modification date of a file?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
What are header files and what are its uses in C programming?