Question: Write the output of the following C program that uses process system calls int main(void) { } int pid, status, lcm=0; pid= fork(); if
Write the output of the following C program that uses process system calls int main(void) { } int pid, status, lcm=0; pid= fork(); if (pid=-1){ printf("error"); exit(1); } if (pid=0){ execl("./a.out","a.out","35","23","32",(char*)NULL); //a.out is an executable file which does LCM of the numbers given as arguments and prints on screen printf("Product of Numbers: %f ",lcm), } else printf("status = %d ",status); wait(&status);
Step by Step Solution
3.52 Rating (155 Votes )
There are 3 Steps involved in it
The output of the program will be status 0 Product of Numbers 1071... View full answer
Get step-by-step solutions from verified subject matter experts
