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

Write about a nested class and mention its use?

1043


What are the various arithmetic operators in c++?

1059


what is COPY CONSTRUCTOR and what is it used for?

1019


What is a c++ map?

1290


Define pointers?

1002


What is runtime polymorphism in c++?

1081


What is pointer to array in c++?

1078


What are the differences between java and c++?

1000


What is #include iostream h in c++?

1090


Why do we use classes in c++?

994


How to declaring variables in c++?

1104


What is a class template in c++?

999


Explain the register storage classes in c++.

1139


What is a try block?

1028


What is expression parser in c++

2410