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

Explain container class.

687


What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?

567


Why we use #include conio h in c++?

591


What is the best ide for c++?

569


What is a static element?

575






How a macro differs from a template?

635


What does the linker do?

591


Can the creation of operator** is allowed to perform the to-the-power-of operations?

578


What is the purpose of extern storage specifier?

621


What is the basic structure of c++ program?

563


What is a template in c++?

635


How do you flush a buffer in c++?

600


What do you mean by volatile and mutable keywords used in c++?

578


What things would you remember while making an interface?

561


What is std :: endl?

596