+ 1

Why we use return 0?

Return 0 in c

28th Jun 2019, 9:47 AM
Pooja Jain
Pooja Jain - avatar
2 Respuestas
+ 2
Thanks
1st Jul 2019, 2:23 PM
Pooja Jain
Pooja Jain - avatar
+ 1
Not only C/C++ standard, but also ASM standard. Returning any number different from 0 represents some kind of errors that the OS' event logger may treat as an error, so it's a very good practice to guarantee that everything goes alright. When ending with errors, you may use another return values.
28th Jun 2019, 10:33 AM
Alexander Santos
Alexander Santos - avatar