Which of the following will generate random numbers in the range 1-100 (both inclusive)?
Posted: Wed Jul 13, 2022 6:16 pm
a) rand() % 100
b) rand() % 101
c) (rand() % (101)) + 1
d) (rand() % (100)) + 1
b) rand() % 101
c) (rand() % (101)) + 1
d) (rand() % (100)) + 1