last return code linux

C++
echo $?
Source

Also in C++: