where path is the path of the executable file and argv is an array of argument strings terminated by a NULL pointer. This is run as:- char *argv[] = {"ls","-l",NULL};
execv("/bin/ls",argv);
This command replaces the current process with ls -l command.