1. Home
  2. GATE CS
  3. Operating System

Filters

Found 1 Question

Set Default
Exams
Years
Subjects
Topics

List of top Operating System Questions on Process Creation and the fork() System Call asked in GATE CS

Consider the following program snippet. Assume that the program compiles and runs successfully. Further, assume that the fork() system call is always successful in creating a process.
int main () {
   int i;
   for (i = 0; i < 3; i++){
      if (fork() == 0){
        continue;
      }
      break;
   }
   printf("Hello!");
   return 0;
}
The total number of times that the printf statement gets executed is ________.
  • GATE CS - 2026
  • GATE CS
  • Operating System
  • Process Creation and the fork() System Call
contact us
terms & conditions
Privacy & Policy
© 2026 Patronum Web Private Limited