Description of C System Function
The system() Function
- The system() function represents a command in the standard C library that takes as its argument a constant character array. In essence, the argument represents a C-style string, which in turn represents a command to send to the operating system. So a programmer would use the function call execute a directory listing on a Windows/DOS computer, like the following example:
#include <stdlib.h>
int main(){
int i = system("dir"); // "i" receives the return result of the command.