Predict the output of the following program code?
Submitted by: Administratormain()
{
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
{
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
Top UNIX Operating System Questions
☺ | What are the Unix system calls for I/O? |
☺ | How do you change File Access Permissions in UNIX OS? |
☺ | What is a FIFO in UNIX OS? |
☺ | Brief about the directory representation in UNIX OS? |
☺ | How does the inode map to data block of a file in UNIX OS? |
Top Operating System (OS) Categories
☺ | RTOS Interview Questions. |
☺ | Windows 7 Interview Questions. |
☺ | MAC Operating System Interview Questions. |
☺ | Disk Operating System (DOS) Interview Questions. |
☺ | Shell Scripting Interview Questions. |