What is the difference between exit(0) and exit(1) in C?

前端 未结 11 1839
时光取名叫无心
时光取名叫无心 2020-12-22 17:19

Can anyone tell me? What is the difference between exit(0) and exit(1) in C language?

11条回答
  •  遥遥无期
    2020-12-22 18:21

    exit() should always be called with an integer value and non-zero values are used as error codes.

    See also: Use of exit() function

提交回复
热议问题