Question: Execute the unmodified program and report on the results. Modify the cmd2 array so that instead of being assigned nullptr , cmd2[1] receives a strdup
Execute the unmodified program and report on the results.
Modify the cmd2 array so that instead of being assigned nullptr, cmd2[1] receives a strdup of "-l". What's the resulting difference in output, and why?
Try changing the argument "/bin/ls" in the call to execv to "ls". What did or did not happen in this call, and why?
Further modify the program from its state in item 3 by changing the call of execv to calling execvp. Again, what did or did not happen in this call, and why?
#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
