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().

Answers were Sorted based on User's Feedback



given the code segment below void main() { cout<..

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

given the code segment below void main() { cout<..

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

More C++ General Interview Questions

What is the use of namespace std in C++?

0 Answers   Hexaware,


Define anonymous class.

0 Answers  


In a class only declaration of the function is there but defintion is not there then what is that function?

5 Answers   Hughes,


What is the difference between a definition and a declaration?

0 Answers  


Explain the isa and hasa class relationships. How would you implement each?

0 Answers  


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

0 Answers  


Is there structure in c++?

0 Answers  


What is the difference between public, private, and protected access?

0 Answers  


How can you force instantiation of a template?

1 Answers   ABC, Amazon,


Explain mutable storage class specifier.

0 Answers  


What is scope in c++ with example?

0 Answers  


What is abstraction with real time example?

0 Answers  


Categories