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


Please Help Members By Posting Answers For Below Questions

What is #include iostream h in c++?

872


Describe private, protected and public?

843


What character terminates all character array strings a) b) . c) END

1000


what is the difference between overloading & overriding? give example.

829


What is binary search in c++?

817


What is a container class?

844


What is the difference between function overloading and operator overloading?

805


What is ctime c++?

869


How are the features of c++ different from c?

811


When should we use multiple inheritance?

833


Comment on assignment operator in c++.

924


What is the difference between a "copy constructor" and an "assignment operator" in C++?

860


What are the extraction and insertion operators in c++? Explain with examples.

936


Who created c++?

816


What is the main function c++?

862