Anyway to get return value of c program from command line? July 30, 2023 by Tarik Yes, the same way you’d do in a Bash script. Run your program like this: ./your_program; echo $?