Recent questions tagged fork-system-call

2 votes
3 answers
4
Int main (){fork();printf("a");fork();printf("b");return 0;}How many distinct outputs are possible of above code? And also give outputs
3 votes
1 answer
5
Consider the following code segment :int main (void) { for (int i=2; i<=5; i++) { fork( ); }printf (“GOCLASSES”);How many times “GOCLASSES” is printed by the ab...
1 votes
2 answers
7
For following code how many times the '*' will printed?main(){ int i,n ; for(i = 1 ; i<=n ; ++i) { fork(); printf("*"); }}
0 votes
3 answers
9
0 votes
1 answer
10
12 votes
4 answers
13
Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?Function Callmalloc CallPage FaultSystem Call
0 votes
1 answer
14
int doWork(){ fork(); fork(); printf("Hello world!\n");}int main() { doWork(); printf("Hello world!\n"); exit(0);}
2 votes
1 answer
17