Is it possible to run another program say program2 from a program say program1 in C? If so can someone suggest me a best and easy way for achieving this?
Printable View
Is it possible to run another program say program2 from a program say program1 in C? If so can someone suggest me a best and easy way for achieving this?
I have a C program and I wanted to invoke or execute another C program from the first C program. Is there any option in C language for doing this? What is the command used for this?
you must have the appropriate Library to do this
What is the appropriate library one must have to do this and how can this be achieved? Can you kindly brief on this.
can i have a name for the library?!
If the C program is run in a UNIX operating system then you can use the exec, execl, execv,execle, execve, execlp, execvp functions to invoke another program from within a C program.