for 2nd problem: statement inside the do-while is executed once. Now for the condition checking inside the while loop. The condition i++<5 is evaluated which turns out to be true. So the rest of the part ++ch<='F' is not evaluated and hence letter A is printed six times. Now when the condition "i++<5" fails, then the condition ++ch<='F' would be evaluated which prints BCDEF. This is a property of the logical OR. If the first condition evaluates to true, then rest of the condition is not evaluated as it would always turn out to be true. However, if the first condition is false then only the second condition is checked to get the final output.
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.