Vidyalelo
C Programming · Q149

File Input Output

Programming · C Programming · question 149

Q149

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

A.
rand() / RAND_MAX
Answer
B.
rand() % 2
C.
rand(0, 1)
D.
none of the mentioned

Answer: Option A

Solution

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