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 a linked list in c++?

1012


How much do coding jobs pay?

973


What is c++ hash?

1068


Explain virtual class?

985


What's c++ used for?

1068


What is the difference between the compiler and the preprocessor?

1066


Explain the uses of static class data?

1068


What is scope resolution operator in c++ with example?

1003


What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h

1019


What are references in c++?

1103


What is a wchar_t in c++?

1079


What is the use of map in c++?

1114


How do I run c++?

1015


What is c++ stringstream?

1063


What are the advantages of pointers?

1032