Top

Discussion

Which statement is true with respect to RAND_MAX?

  • A.specifies value for status argument to exit indicating failure
  • B.specifies value for status argument to exit indicating success
  • C.specifies maximum value returned by rand()
  • D.specifies maximum value returned by srand()

Answer: C

RAND_MAX specifies maximum value that has to returned by the function rand().
rand() function returns a pseudo-random number in the range 0 to RAND_MAX.

No comment is present. Be the first to comment.
Loading…

Post your comment