C Language: system function
(Perform Operating System Command)
In the C Programming Language, the system function allows a C program to run another program by passing a command line (pointed to by string) to the operating system's command processor that will then be executed.
Syntax
The syntax for the system function in the C Language is:
int system(const char *string);
Parameters or Arguments
- string
- A command line that will be executed by the operating system's command processor.
Returns
The system function returns a nonzero value if a command processor is available and string is a null pointer. The system function returns an implementation-defined value if string isn't a null pointer.
Required Header
In the C Language, the required header for the system function is:
#include <stdlib.h>
Applies To
In the C Language, the system function can be used in the following versions:
- ANSI/ISO 9899-1990
Similar Functions
Other C functions that are similar to the system function:
Advertisements