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 are valid signatures for the Main function?
What are compound statements?
What is sizeof int?
Explain how can you check to see whether a symbol is defined?
What is difference between %d and %i in c?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
What is the purpose of macro in C language?
What are the primitive data types in c?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
What is a program flowchart and how does it help in writing a program?
Explain null pointer.
Difference between malloc() and calloc() function?
How can I read a binary data file properly?
What is the meaning of typedef struct in c?
What is use of bit field?