The return value of fork() is:-
- 0 for child processes
- Positive for parent processes
- Negative, then it signifies some error.
You can think of it as their ages. Parents would definitely be aged 0+, and newborn children would be aged 0. There can't be valid negative age.
So, when the process executes
if(fork()) == 0))
A child process is created. Since the current process is the parent process, fork() $\neq0$ so the if-condition is False. => Print 10.
The child process would start running from the NEXT instruction. So, a = 11 now. Then Print 11.
Option A