Question: please help A program's main function is as follows: int main(int argc, char *argv[]) { char *str = argv+1; //1st element of array argv while
please help
A program's main function is as follows: int main(int argc, char *argv[]) { char *str = argv+1; //1st element of array argv while (1) printf("%s", str); return 0; } Two processes, each running an instance of this program, are currently running (you can assume nothing else of relevance is running, except perhaps the shell itself). The programs were invoked as follows, assuming a parallel command" prompt> main a & main b Below are possible (or impossible?) screen captures of some of the output from the beginning of the run of the programs. Which of the following are possible for the sequence as shown? To answer: Choose A for possible, B for not possible for EACH question abababab ... B aaaaaaaa... bbbbbbbb... B aaaabbbb... bbbbaaaa ... B
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
