The values of the Boolean expressions "A > B " and "B > C " are independent.
On the average, A > B , 75 percent of the time and B > C , 25 percent of the time.
If the program segment above is executed 10,000 times, how many times would one expect the functions F and G to be executed?
If the program segment above is executed 10,000 times then as we are given that A > B , 75 percent of the time. F will execute when A>B.
So, F will execute (0.75)*(10,000) = 7500.
But G will execute when two things happen simultaneously : (A>B) fails AND (B>C) becomes true.
So, G will execute (0.25)*(0.25)*(10,000) = 625.
If you have answered option D then mistake is that you only considered B>C But Not considered A>B.