MCQOPTIONS
Saved Bookmarks
| 1. |
For the incomplete program below, which of the code fragment will not result in an infinite loop: |
| A. | do { j = j + (i % 10); }while ((i = i / 10)!= 0); |
| B. | do { j = j + (i % 10); }while ((i / 10)!= 0); |
| C. | do { j = j + (i % 10); }while ((i % 10)!= 0); |
| D. | do { j = j + (i % 10); }while ((i/10 == 0)!= 0); |
| Answer» B. do { j = j + (i % 10); }while ((i / 10)!= 0); | |