Vidyalelo
Computer Science · Q942

Linux

Engineering and GATE · Computer Science · question 942

Q942

How many times printf() will be executed in the below mentioned program? main() int i; for (i = 0; i < 4; i++) fork(); printf("my pid = %d ", getpid());

A.
4
B.
8
C.
16
Answer
D.
32

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board