I am writing a program that will recreate the pipe in UNIX. The user enters a command that gets stored in a char array arguments included and in order to execute them I need to call exec but my program is how do I separate the command from the arguments so I can do something like this:
data in char command: ls -l
execvp("ls", <arguments>(in this case -l));