

MCQOPTIONS
Saved Bookmarks
1. |
Which is the correct way to generate numbers between minimum and maximum(inclusive)? |
A. | minimum + (rand() % (maximum – minimum)); |
B. | minimum + (rand() % (maximum – minimum + 1)); |
C. | minimum * (rand() % (maximum – minimum)) |
D. | minimum – (rand() % (maximum + minimum)); |
E. | ?a) minimum + (rand() % (maximum – minimum));b) minimum + (rand() % (maximum – minimum + 1));c) minimum * (rand() % (maximum – minimum))d) minimum – (rand() % (maximum + minimum)); |
Answer» C. minimum * (rand() % (maximum – minimum)) | |