aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Computer Science (GATE Exam) 2012 - Previous Question Paper Solution
  • A process executes the code fork ( ); fork ( ); fork ( );...
Multiple choice

A process executes the code fork ( ); fork ( ); fork ( ); The total number of child processes created is

  1. 3

  2. 4

  3. 7

  4. 8

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

If fork is called n times, there will be total 2 running processes including the parent process. So, there will be 2i child processes.

Keep practicing — related questions

  • A process executes the following code for (i = 0; i < n; i++) for (); The total number of child processes c...
  • How many child processes are created if two fork () system calls are called?
  • The fork() function is used to create a new process from an existing process.
  • A process is brought into existence by some other process executing the __________.
  • main(){ fork(); fork(); fork(); printf("Hello World!"); } How many times "Hello World!" will be printed?
  • What is the return value of fork() system call in the parent process when the child process has been succes...
  • Output of below code is: main() { fork(); fork(); fork(); printf("Hello"); }
  • Which system call causes the current process to be split into two processes - a parent and a child?
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy