• edited by
1,244 views
2 2 votes
fork();

fork();

printf("Gate2024");

fork();



what will be the answer?

1 Answer

0 0 votes
Here, first two fork()'s will be executed and "Gate2024" will be printed 4 times with one parent process and 3 child proceses , last fork() executes and 8 processes(1 parent , 7 child)  will be created.
Position:
Show:

Related questions

2 2 votes
0 0 answers
625
625 views
kohz asked Jan 15, 2025
625 views
is'nt it possible for CPU And DMA cycles to overlapp if cpu does some cpu intensive work which does not need Bus
2 2 votes
3 answers 3 answers
5.5k
5.5k views
Devwritt asked Oct 23, 2016
5,491 views
I always face problem in fork questions please explain in detail (with theory). Thanks Assume that main () calls the following function test () exactly once Void test (...