closed by
1,172 views
3 votes
3 votes
closed as a duplicate of: fork

for(i=1;i<=3;i++) {
    fork();
    printf("x");
}

How many times 'x' is printed ?

closed by
Answer:

Related questions

416
views
1 answers
1 votes
Sparkboy asked Apr 4
416 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,159 views
Int main (){fork();printf("a");fork();printf("b");return 0;}How many distinct outputs are possible of above code? And also give outputs
855
views
1 answers
0 votes
Erwin Smith asked Apr 11, 2023
855 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
870
views
0 answers
1 votes
Souvik33 asked Nov 28, 2022
870 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