Hi friends,
help me out
Generally If the call to fork() is executed successfully Unix will create identical copies address spaces and the execution starts from the next statement of the fork()
So, in such case
output of the following prog must be
#include<stdio.h>
{
printf("\nwelcome to");
fork();
printf("\nDaniWeb Discussion");
}
O/P as per the theory:
------------
welcome to
DaniWeb Discussion
DaniWeb Discussion
but O/p coming is
welcome to
DaniWeb Discussion
welcome to
DaniWeb Discussion