Using execv

execv like all other calls of the exec family,creates a new process replacing the current process.

The syntax of execv is


The operation is exactly same as that of execve as described in "Usage of execve". The only differece is that execv does not take the third argument

Here is an example of using execv :

Let us take a program to print hello world.

hello.c :

compile this to generate the executable hello

Here is a program that will launch the executable hello using execv


Follow by Email