ISRO | ISRO CS 2017 – May | Question 50
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
Last Updated :
21 Mar, 2018
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...