Search results for fork

3 votes
2 answers
23
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
24
0 votes
1 answer
25
int doWork(){ fork(); fork(); printf("Hello world!\n");}int main() { doWork(); printf("Hello world!\n"); exit(0);}
2 votes
1 answer
28
0 votes
2 answers
29
On Solving manually I too getting 14 as answer. but on running more than 14 * are printed.
41 votes
6 answers
33
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
34
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
39
9 votes
4 answers
40
main() { if(fork()>=0) { printf("*"); if(fork()==0) { printf("*"); } else{ //do nothing } printf("*"); }How many number of times “*” will be printed?