header file: stdio.h
FILE *popen(const char *command, const char *mode);
header file: stdio.h
FILE *_popen(const char *command, const char *mode);
This function creates a pipe and executes a specified
command.
The Windows and Unix versions of this function differ only in
name; when porting, developers should only need to take into
account the different name of this Windows version (_popen versus
popen).
Windows also provides a wide-character version of this function,
_wpopen().
Example of Use in Windows
For a complete example, please see the MSDN article.