1,313 views
1 votes
1 votes

2 Answers

1 votes
1 votes
In first fork() call  no of process is 2 -  AA is printed

In second fork() call no of process is 2^2 - BBBB is printed    

In third fork() call no of process is 2^3 - CCCCCCCC is printed    

Ans is D.

Related questions

0 votes
0 votes
1 answer
2
abhinowKatore asked Jan 13, 2023
1,416 views
int doWork(){ fork(); fork(); printf("Hello world!\n");}int main() { doWork(); printf("Hello world!\n"); exit(0);}
1 votes
1 votes
2 answers
4
junaid ahmad asked Jan 1, 2019
1,455 views
int main(void) { int var1=100; int pid; if(pid==fork()) var1=200; fork(); printf("%d",var1); return 0; }what could be the output ?a)100 100 200 200b)200 200 200 200c)none...