why does the execution of a c++ program start with main()???

Answer Posted / brian

Using static class execution can actually begin before main()!

E.g.

class MyStatic
{
public:
MyStatic() { cout << "MyStatic Class called." << endl; };
};

static MyStatic ms;

void main()
{
cout << "main called." << endl;
}

Output : =
MyStatic Class called.
main called.

Is This Answer Correct ?    13 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How stl is different from the c++ standard library?

840


To modify an, existing worksheet. What steps are involved for: 1. Inserting and deleting rows and columns. 2. Printing cell formulas 3Jld displayed values 3. Using the page setup command

1962


What is a list in c++ stl?

878


Who created stl?

852


Do you like to Submit Questions in Bulk under Same Category?? Then use our Bulk ListerDo you like to Submit Questions in Bulk under Same Category?? Then use our Bulk Lister

1850


Explain stl.

1078


What is a standard template library (stl)? What are the various types of stl containers?

893


Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.

1833


What are the various types of stl containers?

913


What is stl stand for?

932


How do I convert a stl file?

759


What is stl in c++ with example?

832


draw a flowchart that accepts two numbers and checks if the first is divisible by the second.

3084


totoo po ba ang manga aliens!

2522


How is stl different from c++ standard library?

947