Interviewer And Interviewee Guide

UNIX Operating System Interview Question:

Predict the output of the following program code?

Submitted by: Administrator
main()
{
fork(); fork(); fork();
printf("Hello World!");
}
Answer:
"Hello World" will be printed 8 times.
Explanation:
2^n times where n is the number of calls to fork()
Submitted by: Administrator

Read Online UNIX Operating System Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.