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 low level language in simple words?

977


Describe private, protected and public?

1038


What is c++ vb?

1028


What is the difference between the compiler and the preprocessor?

1050


Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.

1063


What are the differences between malloc() and calloc()?

1108


What does it mean to declare a member function as virtual?

1012


What does floor mean in c++?

1018


Write about the various sections of the executable image?

932


What is a stack c++?

954


Write a function to find the nth item from the end of a linked list in a single pass.

923


Write about the access privileges in c++ and also mention about its default access level?

1007


How are the features of c++ different from c?

1016


Why we use #include iostream in c++?

990


In what situations do you have to use initialization list rather than assignment in constructors?

1012