0

I don't know the role of the return 0 in the program because whether i add it or omit it there is no deference in exuction of the program.

I try to swap the 0 by 1 the terminal indicate to something wrong.

  • 1
    "[The return value for `main` indicates how the program exited. Normal exit is represented by a 0 return value from `main`. Abnormal exit is signaled by a non-zero return, but there is no standard for how non-zero codes are interpreted.](/a/204483/15497888)" – Henry Ecker Jan 28 '23 at 20:47
  • There are some [very loose conventions](https://www.unix.com/man-page/freebsd/3/sysexits/) that nobody seems to follow. – tadman Jan 28 '23 at 22:01
  • 1
    I wish the C99 spec hadn't licensed falling off the end of main, it confuses people out of all proportion to the time saved. – zwol Jan 29 '23 at 01:02

0 Answers0