Which of these is a correct way to generate numbers between 0 to 1(inclusive) randomly?
A. rand() / RAND_MAX
B. rand() % 2
C. rand(0, 1)
D. None of the mentioned
Answer:A
Which of these is a correct way to generate numbers between 0 to 1(inclusive) randomly?
A. rand() / RAND_MAX B. rand() % 2 C. rand(0, 1) D. None of the mentioned