UNIX Operating System Question:
Download Job Interview Questions and Answers PDF
Predict the output of the following program code?
![UNIX Operating System Interview Answer UNIX Operating System Interview Question](https://globalguideline.com/public/images/interview/34.png)
Answer:
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()
{
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()
Download UNIX Operating System Interview Questions And Answers
PDF
Previous Question | Next Question |
Predict the output of the following program code in UNIX? | List the system calls used for process management in UNIX? |