1. Engineering
  2. Computer Science
  3. develop c program and give output in screenshort ...

Question: develop c program and give output in screenshort ...

Question details
Develop c program and give output in screenshort ?
develop e programing language and here I attached program and you can add left e program 1. Develop a program that accepts integers from command line and uses fork0 to have 4 child s that will do sorting the integers into ascending order, computing the sum of the integers, and counting the number of even numbers and the number of odd numbers respectively. Template for program After conversion of string integers to real integers do the follows so that there are 4 child processes. #include <stdio.h> Winclude Cunistd.h include <stdlib.h> main(int arge, char * argv[]) int i-0, data(argc-1], Sum-0, EvenCount-o, OddCount-0 for (i-I; iangc; i++) /convert strings to integers*/ data( 1-1 ] = atoi(argv(ijk switch(forko) t case-1 case 0*1st child process/ here for sorting* exit(I); switch fork) case -1 case 0:/2nd child process/ here for summing exit(2) switch forkO) case 0: /3rd child process here for counting even switch(forko) case 0: *4th child process here for counting odd/ exit(4);
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution