Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the hardest coding language to learn?

1044


What is friend class in c++ with example?

1054


Is c++ the best programming language?

1029


How many types of modularization are there in c++?

1085


Differentiate between an external iterator and an internal iterator?

1005


Why is main function important?

1118


Explain the static storage classes in c++.

1281


Is c or c++ more useful?

1060


What is the use of map in c++?

1155


What is the most common mistake on c++ and oo projects?

985


Differentiate between structure and class in c++.

1097


What is c++ w3school?

1118


Explain stack unwinding.

1083


What is the difference between new() and malloc()?

2091


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

991