2 votes 2 votes closed as a duplicate of: fork system call int main(void) { if(fork() && fork()) { fork(); } if(fork() || fork()) { fork(); fork(); } printf("\nGate 2017\n"); } How many times "Gate 2017" will be printed? Operating System operating-system fork-system-call + – dd asked Oct 24, 2016 closed Oct 24, 2016 by vijaycs dd 1.2k views comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments Habibkhan commented Oct 24, 2016 reply Follow Share I did without the concept of shortcircuiting within the conditions.So answer will vary I suppose since by default short circuiting is allowed .Let me check once more.. 0 votes 0 votes Prabhanjan_1 commented Oct 24, 2016 reply Follow Share https://gateoverflow.in/69830/os 0 votes 0 votes ADITYARAJ commented Mar 5 reply Follow Share Ans: 36 Times Gate 2017 printed 0 votes 0 votes Please log in or register to add a comment.