CS604 Assignment 1 Solution Spring 2021
Coding:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
int main (void)
{int pid,status;
pid=fork();
if(pid>0>
{printf("In Parent Process \n");
printf("VUID: BC123456789 \n");
printf("JobMarkaz.com \n");
printf("Existing the Parent Process");
wait(0);
exit(1);
}
else if (pid==0)
{
int n=9;
int i;
printf("In Child Process \n");
printf("Multiplication table of 9 \n");
for(i=1;i<=10;i++)
{
printf("%d X %d= %d \n" ,n,i,i*n);
}
}
}
Download File: |
Click Here |
---|
No comments:
Post a Comment