When talking about starting a new process, you can do it using int system(char* command). If you pass an non NULL parameter, you can get:
-1if the child process cannot be started;- a return code of the child process otherwise;
note: in Unix/Linux the return code is located on the higher eight bits of the result, while the lower eight bits contain the termination reason code>{1}<, so a retcode equal to 1 will be returned as 256; you can get the actual return code by shifting the value eight bits to the right; there is also a macro named WEXITSTATUS() that does it for you.
Searching for the implementation of WEXITSTATUS() it's a shift 8 bits to the right.
#define WEXITSTATUS(x) (_W_INT(x) >> 8)
This is the reason why I tend to think that return codes are 2 bytes (and also from >{1}<). The quote is from a C course found online.
P.s I would like to know the difference between the return code and termination reason code, aren't they the same?