What is the difference between system and exec family commands? Especially I want to know which one of them creates child process to work?
system() invokes the desired program or built-in command using a shell, this is an inefficient way because a shell is started before the program is started.
In the case of the exec family of system calls, a whole new image is being created, that is, they replace the current process with a new process specified by the path or file or whatever argument you are mentioning.
The thing to be kept in mind is that, when the exec family of system calls are used, the original program will no longer be running after the new one is started.