What is the output of the following program?
main( ) { int a = 10; if ((fork ( ) == 0)) a++; printf (“%d\n”, a ); }
(A) 10 and 11
(B) 10
(C) 11
(D) 11 and 11
Answer: (A)
Explanation: For detail explanation, refer: fork() in C
Quiz of this Question
Article Tags :
Recommended Articles