Vidyalelo
Data Structure · Q325

Miscellaneous on Data Structures

Programming · Data Structure · question 325

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
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board