You do that by using CreateProcess() and waiting on the process handle using WaitForSingleObject(). Once it is done waiting, you call GetExitCodeProcess() to obtain the return value of the process and store it in a DWORD variable. Then you can easily print it out.
Google up "createprocess" and read the documentation of the function in the MSDN Online website. It comes complete with samples.
You will also see the header, LIB and DLL files that include this function at the bottom. Since you mention stdlib.h, I am only guessing you have never programmed for Windows in the past, so it would be best if you read a tutorial on the matter first.