Linux OS Management Question:
Download Questions PDF

Return value of fork() system call can be:
a) -1,<0,0
b) -1,>0,0

Linux Operating System Management Interview Question
Linux Operating System Management Interview Question

Answer:

b) -1,>0,0

Download Linux Operating System Management Interview Questions And Answers PDF

Previous QuestionNext Question
Pid of init process:
a) 0
b) 1
c) 32767
d) none of the above
How many times printf() will be executed in the below mentioned program?

main() {
int i;

for (i = 0; i < 4; i++)
fork();

printf("my pid = %dn", getpid());
}

a) 4
b) 8
c) 16
d) 32