Page 1 of 1

Which of these is a correct way to generate numbers between 0 to 1(inclusive) randomly?

Posted: Wed Jul 13, 2022 7:54 pm
by answerhappygod
a) rand() / RAND_MAX
b) rand() % 2
c) rand(0, 1)
d) none of the mentioned