Examveda

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: Option D


This Question Belongs to Data Structure >> Miscellaneous On Data Structures

Join The Discussion

Related Questions on Miscellaneous on Data Structures