308 views

1 Answer

Best answer
1 votes
1 votes
you can rewrite it and check its printing Hello "4" times

int main() 
{


    if(fork()==0)
    {
        printf ("%s\n","hello");
    }

 if(fork()==0)
    {
        printf ("%s\n","hello");
    }
    
}
selected by

Related questions

0 votes
0 votes
3 answers
1
jayadev asked Feb 1, 2022
950 views
Consider the following program segment of C-programming language:#include<stdio.h int main() { if (fork() || fork()) fork(); printf("GATE\n"); return 0; } Number of times...
1 votes
1 votes
1 answer
2
Nancy Pareta asked Jun 14, 2018
583 views
How to solve such type of questions using tree I am having doubt in these types from where i can practice this type of question and can clear my concept
1 votes
1 votes
0 answers
3