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 / sunil chopra
Overload the << operator.
ostream& operator << (ostream& ot, const char* chr)
{
using std::operator<<;
return ot << "Hai Arvind " << chr << " 99999999999";
}
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
What is the hardest coding language to learn?
What is friend class in c++ with example?
Is c++ the best programming language?
How many types of modularization are there in c++?
Differentiate between an external iterator and an internal iterator?
Why is main function important?
Explain the static storage classes in c++.
Is c or c++ more useful?
What is the use of map in c++?
What is the most common mistake on c++ and oo projects?
Differentiate between structure and class in c++.
What is c++ w3school?
Explain stack unwinding.
What is the difference between new() and malloc()?
What do you mean by volatile and mutable keywords used in c++?