How to remove this line in language C : “Program ended with exit code: 0”

后端 未结 3 1259
野性不改
野性不改 2021-01-14 07:01

I wrote a code in C and it executed perfectly but at the end I got a line saying \"Program ended with exit code: 0\". What does this line signify and how do I get rid of thi

相关标签:
3条回答
  • 2021-01-14 07:39

    Basically what it means is that the program ran without any error. A 0 usually says that the program executed properly. Any nonzero number denotes some problem. Use text editors such as emacs or vim etc. and compile and execute your program.

    0 讨论(0)
  • 2021-01-14 07:49

    What it is?

    an exit code of 0 indicates no error. If a program wants to indicate there was something wrong when it exited it will exit with a non-zero value.

    How to get rid of it?

    Do not use the IDE for program execution. – as BLUEPIXY said.

    0 讨论(0)
  • 2021-01-14 07:54

    The message doesn't come from your program itself, but from the IDE (e.g. Visual Studio) that launches the program. Try launching it from the command-line or by double-clicking the .exe file.

    The meaning of "exit code 0" is usually: Everything went fine, the program exited successfully. Other exit codes usually stand for aborts because of errors and the actual number gives a hint about the type of error that occurred.

    0 讨论(0)
提交回复
热议问题