Q325
Which of the following will generate random numbers in the range 1-100 (both inclusive)?
A.
rand() % 100
B.
rand() % 101
C.
(rand() % (101)) + 1
D.
(rand() % (100)) + 1
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board