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 are the advantages of C++ programming compared to C programming?

2 Answers   HAL,


Is arr and &arr are same expression for an array?

0 Answers  


What is late binding c++?

0 Answers  


what are the types of Member Functions?

0 Answers  


If you want to share several functions or variables in several files maitaining the consistency how would you share it?

0 Answers  






Is sorted c++?

0 Answers  


What's the hardest coding language?

0 Answers  


what is VOID?

0 Answers  


Write a program and call it sortcheck.cpp which receives 10 numbers from input and checks whether these numbers are in ascending order or not. You are not allowed to use arrays. You should not define more than three variables

2 Answers   BirlaSoft, Crayonz,


What are single and multiple inheritances in c++?

0 Answers  


write a C++ programming using for loop: * * * * * * * * * *

4 Answers   TCS,


How to create a pure virtual function?

1 Answers  


Categories