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
Is empty stack c++?
How many types of scopes are there in c++?
Can I learn c++ as my first language?
Does dev c++ support c++ 11?
What is microsoft c++ redistributable 2013?
What is constant in c++ with example?
What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal
What is a volatile variable in c++?
Explain the difference between static and dynamic binding of functions?
How does java differ from c and c++?
How will you call C functions from C ++ and vice-versa?
Write a short code using c++ to print out all odd number from 1 to 100 using a for loop
What are c++ data types?
What is function declaration in c++ with example?
Where must the declaration of a friend function appear?