Open In App

ISRO | ISRO CS 2017 – May | Question 50

Like Article
Like
Save
Share
Report

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
Previous
Next
Share your thoughts in the comments
Similar Reads