|
#include<stdio.h>
#include<sys/types.h>
int main()
{
printf("Before forking\n");
if(fork()==0)
printf("After forking\n");
}
try this for ur required output.
note:If successful, fork() returns 0 in the child process, and returns the process ID of the child process to the parent process.
and the remaining analyzy i left to you...good luck
|