Further to brother
Utilitarians post (& the useful, pertinent stuff therein), the thing you ought to do as a matter of importance is to read
system - had you done so, you would now know that the return value from
system is not the STDOUT/STDERR from the call, but rather a 16 bit number comprising the return code from the sub-process created and signal number with which the subprocess terminated.
A user level that continues to overstate my experience :-))