system function(Perform Operating System Command) in C Language – example and detail

In the C Programming Language, the gadget feature lets in a C program to run another software by using passing a command line (pointed to by means of string) to the running system’s command processor that will then be executed.

Syntax

The syntax for the machine function in the C Language is:

int system(const char *string);

Parameters or Arguments

string A command line that will be completed via the running system’s command processor.

Returns

The device feature returns a nonzero value if a command processor is on hand and string is a null pointer. The gadget function returns an implementation-defined price if string isn’t a null pointer.

Required Header

In the C Language, the required header for the system characteristic is:

#include <stdlib.h>

Applies To

In the C Language, the system feature can be used in the following versions:

ANSI/ISO 9899-1990

Similar Functions

Other C features that are comparable to the system function:

getenv function <stdlib.h>