answersLogoWhite

0

Why you return zero from main?

User Avatar

Anonymous

14y ago
Updated: 8/19/2019

By conventions 0 means success, everything else is error-code

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is the return type of main?

The normal exit of program is represented by zero return value. If the code has errors, fault etc., it will be terminated by non-zero value. In C++ language, the main() function can be left without return value. By default, it will return zero. To learn more about data science please visit- Learnbay.co


What is the default return type of a function?

The normal exit of program is represented by zero return value. If the code has errors, fault etc., it will be terminated by non-zero value. In C++ language, the main() function can be left without return value. By default, it will return zero. To learn more about data science please visit- Learnbay.co


Why return 1 is used in int main function in c?

Returning a value of 1 (or any value besides zero) from main indicates an error.


Which function calls itself repeatedly?

A main (or not-main) function can return a value to its caller.If the main function was called by the system, the return value means 0=success other=error-code.Function main can call itself, but it is not common.Example:int main (int argc, char **argv){int rc;if (argc>1) rc= main (argc-1, argv+1)else rc= 0;return rc;}


What data type does the main function return in c?

The main function must return the int data type. A program that terminates normally should return the value zero to indicate no error. Not all execution environments make use of the return value (Windows in particular), however a command script or batch file can examine the ERRORLEVEL if required.


Can return statement be in a void method in java?

the main method in java is the client code therefore doesn't return any values Unlike languages like C/C++, the user doesn't specify an error return code by returning from the main method. Instead they should use System.exit(code) to do this. If the Java main method returns, the default code of zero is returned.


Return on equity equals return on assets?

When the debt ratio is zero


What are the ratings and certificates for Dispatches - 1987 Return to Year Zero?

Dispatches - 1987 Return to Year Zero is rated/received certificates of: Singapore:PG


what is the zero-moment pt?

the point of no return


What is the significance to the name?

main refers to the entry point of an application. All programs must have a main() function that returns an integer to the calling program or script. The return value can be used for any purpose, but generally a non-zero negative value is used to indicate that an error occurred (zero meaning no error).


How many days can you return a new car purchased in Florida?

Zero.. there is no return policy


What are the release dates for Return to Zero - 2014?

Return to Zero - 2014 was released on: USA: 2014 USA: 8 March 2014 (Cinequest Film Festival)