The C library function system() passes the command name or program name specified by
a command to the host environment to be executed by the command processor. After the execution of the command it returns a value depending on the status of the execution.
Declaration:
To use this function,
Declaration:
To use this function,
int system( const char *command )
When you call this function, It will invoke the command processor to execute a command. If the command execution is terminated the processor will trasnfer the control back to the program that has called the system command.
Parameters:
String containing name of system command or requested variable.
Return Value:
It will return an integer value, but the interpretation of that is system dependant. So, on different systems it gets interpreted differently. If an error occured in the program execution, '-1' is returned, Ootherwise it returns the status of command.
Click here to know how you can restart your computer using system function.
As, always, Have a happy reading and Stay Awesome !
Parameters:
String containing name of system command or requested variable.
Return Value:
It will return an integer value, but the interpretation of that is system dependant. So, on different systems it gets interpreted differently. If an error occured in the program execution, '-1' is returned, Ootherwise it returns the status of command.
Click here to know how you can restart your computer using system function.
As, always, Have a happy reading and Stay Awesome !
-------------------------------------------------------------------------------------------------
Follow our blog posts @ Follow. So that you won't miss any interesting post and also to be the first to know the answers to many interesting questions.
Follow us on our Facebook page @ Fre Blogg
Head over to my You Tube channel for some interesting tutorials @ You Tube
0 comments:
Post a comment
Please Enter your comment here......