Multiple choice

Consider the following program. int main(){ int status; int counter = 1; if (fork() == 0) { counter++; printf(“%d”,counter); } else { if (fork() == 0) { printf(“5”,); counter--; printf(“%d”,counter); exit(0); } else { if (wait(&status) > 0) { printf(“6”); } } } printf(“3”); exit(0); } The output which is not possible from this program is

  1. 253063

  2. 251633

  3. 520633

  4. 506323

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

null