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 / 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


Please Help Members By Posting Answers For Below Questions

Why do we use string in c++?

891


Define a constructor?

1000


How do we implement inheritance in c++?

1076


Array base access faster or pointer base access is faster?

2242


What is the iunknown interface?

1078


Give an example of run-time polymorphism/virtual functions.

953


What is flush c++?

922


What is the difference between prefix and postfix versions of operator++()?

1030


Specify different types of decision control statements?

803


What is the oldest programming language?

950


What are the various access specifiers in c++?

983


What is switch case in c++ syntax?

1053


Mention the purpose of istream class?

1063


Why is main function important?

1054


Is string an object in c++?

1108