Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

why do we need return 0 in c?

The return value is the exit code of your program, the shell (or any other 
application that ran it) can read and use it.
The 0 exit code is a widely accepted convention for 'OK the program execution 
was successfull'. And for non-zero numbers, it conventionally means the 
program didn't execute successfully or there is an error.
 
PREVIOUS NEXT
Tagged: #return
ADD COMMENT
Topic
Name
5+2 =