Here we will see some amazing results by using the system() function in C or C. This system feature is present in Windows, Linux and MAC operating systems. This function is used to execute system commands that can be written in the command line.
Here we will see two uses of system functions in C or C. The first is to use a C program to get the IP configuration details.
1 2 3 4 5 6 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
The second one is more interesting. Using this, we can shut down the computer. We only need to write the path of the shutdown program in the system function.
1 2 3 4 5 6 |
|
1 |
|
The above is the detailed content of What's the amazing thing about using system() in C/C++?. For more information, please follow other related articles on the PHP Chinese website!