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
How can I read/write structures from/to data files?
Explain what are its uses in c programming?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
How many header files are in c?
How do I round numbers?
What is the difference between struct and typedef struct in c?
Do you have any idea how to compare array with pointer in c?
a program that can input number of records and can view it again the record
How can I ensure that integer arithmetic doesnt overflow?
Can you add pointers together? Why would you?
Can i use “int” data type to store the value 32768? Why?
Is return a keyword in c?
how many key words availabel in c a) 28 b) 31 c) 32
Do pointers take up memory?
What is c method?