adplus-dvertising
frame-decoration

Question

The following C program executes :

main()
{
fork();fork();printf("yes");
}
prints yes:

a.

only once

b.

twice

c.

four times

d.

eight times

Answer: (c).four times

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. The following C program executes : main() { fork();fork();printf("yes"); } prints yes:

Similar Questions

Discover Related MCQs

Q. A virtual memory system uses First In First Out (FIFO) page replacement policy and allocates a fixed number of frames to a process. Consider the following statements :

P : Increasing the number of page frames allocated to a process sometimes increases the page fault rate
Q : Some programs do not exhibit locality of reference

Which of the following is TRUE?

Q. For 3 page frames, the following is the reference string :

7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1

How many page faults does the LRU page replacement algorithm produce ?

Q. Applying the LRU page replacement to the following reference string :

1 2 4 5 2 1 2 4

The main memory can accommodate 3 pages and it already has pages 1 and 2. Page 1 came in before page 2.
How many page faults will occur ?

Q. In the working set model, for :

2 6 1 5 7 7 7 7 5 1 6 2 3 4 1 2 3 4 4 4 3 4 3 4 4 4 1 3 2 3

if DELTA = 10, then the working set at time t1 (….7 5 1) is :

Q. Consider the following page reference string :

1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6

For LRU page replacement algorithm with 4 frames, the number of page faults is :

Q. Consider the following page reference string :

1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6

For FIFO page replacement algorithms with 3 frames, the number of page faults is :

Q. Consider the following page reference string :

1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6

For FIFO page replacement algorithms with 4 frames, the number of page faults is :

Q. Consider the following page reference string :

1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6

For Optimal page replacement algorithms with 3 frames, the number of page faults is :

Q. What command is used to count the total number of lines, words, and characters contained in a file?

Q. What command is used to remove files?

Q. What command is used to remove the directory?

Q. What command is used with vi editor to delete a single character?

Q. What hardware architectures are not supported by Red Hat?

Q. The physical layer of a network

Q. What TCP/IP protocol is used for remote terminal connection service?

Q. How many networks and nodes per network, are allowed by the Class B network?

Q. What service is used to translate domain names to IP addresses?

Q. Which of the following command is used to create a Linux installation boot floppy?

Q. How can you add Amit, a new user, to your system?

Q. What file specifies the order in which to use specified name services?