How can I get what my main function has returned?

前端 未结 5 1865
隐瞒了意图╮
隐瞒了意图╮ 2020-12-04 15:28

In a C program if we want to give some input from terminal then we can give it by:

int main(int argc, char *argv[])

In the same way, if we

5条回答
  •  囚心锁ツ
    2020-12-04 15:52

    You can get the exit values with the command basic linux command echo $? The error codes are standard and the details are explained in this link

    The general codes are

    **

    0- success

    1- general errors

    126- permission issue

    127-Illegal command

    128-Invalid arguments and fatal errors

    255-Out of range**

提交回复
热议问题