Query on operating systems


#1

Consider the following program:
main( ) { intpid pid= fork( ); printf(“%d”, pid); }
What is the output by parent and child processes?
(a) child= 0, parent= 0
(b) child= 0, parent= process_id of child
© child= 1, parent= 0


#2

B is the answer. And you need to remember it.