In response to a note above that advocated the user of system() in a setuid program written in C, this is generally a bad idea for security.
You should use the standard library calls like execl() instead because system() can be manipulated to execute the wrong thing using the SHELL, IFS and possibly other variables.