2,320 views
1 1 vote

2 Answers

1 1 vote
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.
Position:
Show:

Related questions

11 11 votes
5 answers 5 answers
2.5k
2.5k views
Kaluti asked Aug 20, 2017
2,540 views
find total no of processes i am getting 29 as answer as all will be child process except one parent process plz explain how answer is 24 here i am very confused in such q...
0 0 votes
1 answers 1 answer
2.2k
2.2k views
abhinowKatore asked Jan 13, 2023
2,241 views
int doWork(){ fork(); fork(); printf("Hello world!\n");}int main() { doWork(); printf("Hello world!\n"); exit(0);}
1 1 vote
1 1 answer
1.7k
1.7k views
Souvik33 asked Nov 28, 2022
1,681 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 parent process...
1 1 vote
3 3 answers
2.6k
2.6k views
junaid ahmad asked Jan 1, 2019
2,625 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