Unix IPC Question:

Download Job Interview Questions and Answers PDF

Predict the output of the following program code
main()
{
fork();
printf("Hello World!");
}

Unix Inter-Process Communication (IPC) Interview Question
Unix Inter-Process Communication (IPC) Interview Question

Answer:

prints Hello world Hello world
All the statements after the call to fork() will be
executed twice

Download Unix Inter-Process Communication (IPC) Interview Questions And Answers PDF

Previous QuestionNext Question
What are the system calls used for process management?Please Explain fork() system call?