1,565 views
4 votes
4 votes
if(fork()||fork()) {
    fork();
    fork();
}
printf("ABC")

 

HOW MANY TIMES ABC CALLED?

1 Answer

Best answer
8 votes
8 votes

Basics:-

The || operator, if First operand gives true then Second operand doesn't evaluate

For clear image https://drive.google.com/open?id=1S538Oa9z0Bm4YtBZeJHxARH2pqPxtLLz 



you can also check following links for better understanding variations on fork() system call

https://gateoverflow.in/232839/fork-system-call

https://gateoverflow.in/231896/fork-system-call

selected by

No related questions found