RAND_MAX macro is the maximum value returned by the rand function.

Category: QuestionsRAND_MAX macro is the maximum value returned by the rand function.
Editor">Editor Staff asked 11 months ago

RAND_MAX macro is the maximum value returned by the rand function.
 
(a) true
 
(b) false
 
This question was posed to me in quiz.
 
Question is taken from General Utilities in chapter C Library of C
NCERT Solutions for Subject Computer science (C Programming) Select the correct answer from above options 
Interview Questions and Answers, Database Interview Questions and Answers for Freshers and Experience

1 Answers
Editor">Editor Staff answered 11 months ago

Correct answer is (a) true
 
Easiest explanation – RAND_MAX is the macro which expands to an integral constant expression, the value of which is the maximum value returned by the rand function.