Question: here I attached two program sorting.c and sum.c with command line program and give me output with screenshort .you can develop another program and read

here I attached two program sorting.c and sum.c with command line program and give me output with screenshort .you can develop another program and read instruction below.

Then develop another program that would use an exec call to run the sorting program and summing program respectively in two different child processes. Let the parent process waits till each child process finish. Then the parent process uses the child process ending status value to know whether each child process ends successfully or not. If not successful, fork() a new child process to do the work again.

sum.c

#include #include #include int main(int argc, char * argv[]) { int i=0,data[argc-1],sum=0; for (i=1; i

sorting.c

#include

#include #include int main(int argc, char * argv[]) { int i=0,data[argc-1],j,temp; for (i=1; idata[j]) { temp=data[i]; data[i]=data[j]; data[j]=temp; } } } printf(" Ascending order : "); for(i=0;i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!