
Hi reader,
Here our task is :
Create 5 processes.
Find whether a number is Armstong and Reverse the same using these processes.
A :Accept number.
C:Find whether it is armstrong.
D:Print Result.
B:Calculate Reverse of the Number.
E:Display Reverse.
Here is the complete Program.
#include<stdio.h>
#include<unistd.h>
main()
{ //initially in A
int num,f1,f2,f3,f4,p1[2],p2[2],p3[2],p4[2],arm,rev,flag=0;
pipe(p1);
pipe(p2);
f1=fork(); //A created B
if(f1>0) //A is working ..
{
f2=fork(); //A created...