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
Your shell probably has a special variable $?, which holds the last program returned value. So, soon after your program finishes, you can run:
$?
echo $?
to see the returned value.