GATE CSE · 2024 · CS1
Question 57: Operating System
Give it a try, then reveal the answer to check your work.
Question 57
CS1NAT2 marksNeeds review
Consider the following code snippet using the
and
system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully without any errors.int x = 3;
while(x > 0) {
fork();
printf("helo");
wait(NULL);
x--;
}
The total number of times the
statement is executed is ________Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerEXPLORE & PRACTISE
Paper and topic context
See where this question comes from and choose what to practise next.
2024CS1
GATE CSE 2024 · Paper 1
Computer Science and Information Technology · Original paper archive
- Section
- Section CS1
- Question type
- Numerical answer (NAT)
- Marks
- 2 marks
Practise related topics
Explore more previous year questions using this question’s imported topic tags.
computer science
GATE CSE previous year questions
information technology
GATE CSE previous year questions
computing
GATE CSE previous year questions
operating system
GATE CSE previous year questions
system calls
GATE CSE previous year questions
Comments
Ask a question, share your approach, or help someone understand.
Log in to view the discussion
You’re not logged in. Log in or create an account to see discussions and add comments.