Basic and Advance C Question:
Download Questions PDF

How do I get an accurate error status return from system on MS-DOS?

Answer:

You can't; COMMAND.COM doesn't tend to provide one. If you don't need COMMAND.COM's services (i.e. if you're just trying to invoke a simple program, without I/O redirection and such) try one of the spawn routines, instead.

Download C Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How can I invoke another program or command and trap its output?How can I call system when parameters (filenames, etc.) of the executed command arent known until run time?