Search results for fork

3 votes
2 answers
21
A process executes the following segment of code :for(i = 1; i <= n; i++) fork (); fork ();The number of new processes created is
0 votes
1 answer
22
0 votes
1 answer
24
int doWork(){ fork(); fork(); printf("Hello world!\n");}int main() { doWork(); printf("Hello world!\n"); exit(0);}
2 votes
1 answer
27
0 votes
2 answers
28
On Solving manually I too getting 14 as answer. but on running more than 14 * are printed.
41 votes
6 answers
32
A process executes the following segment of code :for(i = 1; i <= n; i++) fork ();The number of new processes created is$n$$((n(n + 1))/2)$$2^n - 1$$3^n - 1$
0 votes
1 answer
33
how many child process will be created for the following code.how many hello and welcome will be printed#include <stdio.h void main() { fork(); fork(); printf("H...
5 votes
8 answers
38
9 votes
4 answers
39
main() { if(fork()>=0) { printf("*"); if(fork()==0) { printf("*"); } else{ //do nothing } printf("*"); }How many number of times “*” will be printed?