Question: What messages do you see on the screen when you run the following program from / tmp / INF 1 2 1 1 directory? Assume
What messages do you see on the screen when you run the following program from tmpINF
directory?
Assume that the user will enter for the first prompt and for the second prompt.
#include
#include
#include
main
pidt chpid;
int data, status;
printfPlease enter a number:";
scanfd &data;
chpid fork;
switchchpid
case :
printfPlease enter a number:";
scanfd &data;
printfValue of data is changed to: d
data;
execlbindate "date", NULL;
break;
default:
wait&status;
printfThe status is: d
WEXITSTATUSstatus;
printfThe value of data is now: d
data;
exit;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
