given the code segment below
void main()
{
cout<<"my no. is";
}
question is how can we get the output hai aravind my no. is
99999999999 without editig the main().
Answer Posted / pankaj rathor
#include <iostream>
using namespace std;
class dummy
{
public:
dummy()
{
cout<<"Hai Arvind ";
}
~dummy()
{
cout<<" 99999999999";
}
};
dummy obj;
int main()
{
cout<<"my no. is";
return 0;
}
| Is This Answer Correct ? | 15 Yes | 2 No |
Post New Answer View All Answers
Write about a nested class and mention its use?
What are the various arithmetic operators in c++?
what is COPY CONSTRUCTOR and what is it used for?
What is a c++ map?
Define pointers?
What is runtime polymorphism in c++?
What is pointer to array in c++?
What are the differences between java and c++?
What is #include iostream h in c++?
Why do we use classes in c++?
How to declaring variables in c++?
What is a class template in c++?
Explain the register storage classes in c++.
What is a try block?
What is expression parser in c++