closed by
1,313 views
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?

closed by

Related questions

401
views
1 answers
1 votes
Sparkboy asked Apr 4
401 views
Consider the following pieces of codes for fork( ) system call. Solve and explain how many child processes are created upon execution of this program? Snippet 1: ... 0; }Learning Outcomes. Understand the working of fork ( ) system call.
1.2k
views
4 answers
2 votes
Philosophical_Virus asked Dec 10, 2023
1,151 views
Int main (){fork();printf("a");fork();printf("b");return 0;}How many distinct outputs are possible of above code? And also give outputs
848
views
1 answers
0 votes
Erwin Smith asked Apr 11, 2023
848 views
void main() { int n = 1; if(fork()==0) { n = n<<1; printf(“%d, “, n); n = n <<1; } if(fork()==0) n=n+700; printf(“%d, “,n); }Which of the following output is not possible?2,4,1,701,7041,2,4,704,7012,704,4,701,11,704,2,4,701
864
views
0 answers
1 votes
Souvik33 asked Nov 28, 2022
864 views
MSQ Consider the following statements, which one of the following is/are TRUEIn fork() system call, child process inherits all the open file descriptors of ... of the parent process User level threads shares the code segment of the process