execve: how can I initialise char *argv[ ] with multiple commands instead of a single command?

Viewed 2629

execve: how can I initialise char *argv[ ] with multiple commands instead of a single command?
If I want to execute 4 commands, can I use the following statement?

char *argv[4][ ] = { {...}, {...}, {...} };

And to execute them using execve, can I use a loop with a var from 1 to 4?

3 Answers
Related