How can I print the return value for the main function?

Question:
You use ‘return 0’ at the end of the code in general.
How can I check out (or print) the return value for the main function ?

int main()
{
...
return 0;
}

I would like to check the return value ‘0’.
How can I check it in repl.it?
Thanks!

I do not know but you can use the following shell command would work.

echo $?

I think you should see the return value of main in the console, but if you stop the Repl manually, you’ll see signal terminated or something like that.

Well C seems to work similar to js, you could use:
variable = main()
But I am not fond of C either so this geekforgeek article might help you.