GATE CS 2019 · Question 27 · Operating System · Numerical answer (NAT) · 1 mark · no negative marks
The following C program is executed on a Unix/Linux system:
#include <unistd.h> int main() { int i; for (i=0; i<10; i++) if (i%2 == 0) fork(); return 0; }
The total number of child processes created is ______.
Answer
Answer 31
Answer from the official GATE CS 2019 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes