closed by
1,239 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

2 votes
2 votes
3 answers
1
Philosophical_Virus asked Dec 10, 2023
768 views
Int main (){fork();printf("a");fork();printf("b");return 0;}How many distinct outputs are possible of above code? And also give outputs
0 votes
0 votes
1 answer
2
Erwin Smith asked Apr 11, 2023
757 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 ...
0 votes
0 votes
2 answers
4
dd asked Sep 15, 2018
1,033 views
The fork system call creates new entries in the open file table for the newly created child process. [True / False][ what is open file table ? ]