working of fork in c language [closed]
Now I have a problem in understanding the working of fork() system call. I write a code which is following : #include<stdio.h> int main() { int a, b; b=fork(); printf("\n the value of b = %d",b); } The output of this code is following : Now I don't understand why the output is like this ? After that i just add a line to my code and output is completely different. my code is following: int main() { int a, b; b=fork(); When i run the code the output is following 2389my name is manish the value of b = 0 Now I'm totally confused about the working of fork() call. My question are following: How fork