What is the significance of main function
See Using wmain for a description of the wide-character version of main. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy. Skip to main content. This browser is no longer supported.
Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Yes No. Any additional feedback? Skip Submit. Submit and view feedback for This product This page. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 7 years, 10 months ago. Active 8 months ago. Viewed 29k times. Improve this question. ThePhysicist ThePhysicist 1 1 gold badge 1 1 silver badge 4 4 bronze badges.
Here you'll find a good explanation. Add a comment. Active Oldest Votes. Nothing to add to Maroun's link. That's the way if you want to know more about return values. Following the standard is a good habit by the way, and I therefore strongly recommend it to you. Improve this answer. Marco A. Community Bot 1 1 1 silver badge.
Sunil Kumar Sunil Kumar 4, 4 4 gold badges 29 29 silver badges 32 32 bronze badges. If you use void main it will return 0. In this case, changes made to the parameter inside the function have no effect on the argument.
This method copies the address of an argument into the formal parameter. Inside the function, the address is used to access the actual argument used in the call.
This means that changes made to the parameter affect the argument. By default, C uses call by value to pass arguments. In general, it means the code within a function cannot alter the arguments used to call the function. C - Functions Advertisements. Previous Page. Next Page. Live Demo. Previous Page Print Page. Save Close. Dashboard Logout. Call by value This method copies the actual value of an argument into the formal parameter of the function. Call by reference This method copies the address of an argument into the formal parameter.