system() (11.7)
It is sometimes convenient to execute a command string from within a program.
For example, to put a time and date stamp into a certain file, one could:
- use time(), and ctime() to get and format the time, then open a file for writing and write the resulting string.
- use system( “date > file” ); (much simpler)
system() is typically implemented by calling fork(), exec(), and waitpid()