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
Why do we use string in c++?
Define a constructor?
How do we implement inheritance in c++?
Array base access faster or pointer base access is faster?
What is the iunknown interface?
Give an example of run-time polymorphism/virtual functions.
What is flush c++?
What is the difference between prefix and postfix versions of operator++()?
Specify different types of decision control statements?
What is the oldest programming language?
What are the various access specifiers in c++?
What is switch case in c++ syntax?
Mention the purpose of istream class?
Why is main function important?
Is string an object in c++?