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
Why do we use string in c++?
What are the benefits of oop in c++?
What's the "software peter principle”?
What are enumerations?
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
What is name hiding in c++?
What is namespace & why it is used in c++?
What is friend class in c++ with example?
Specify different types of decision control statements?
What new()is different from malloc()?
Can you pass a vector to a function?
What is difference between rand () and srand ()?
How do I run a program in notepad ++?
What is abstraction in c++ with example?
What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?