How To Use System Commands In C?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use system commands in C using the system() function. This function executes a command as stated in the argument and returns an integer value depending on the execution of the statement. A return value of 0 indicates that the command was executed successfully and any other value indicates an error.
Example:
system(“mkdir test”) // This will create a folder named “test” in the current directory.