Chapter 14. Miscellaneous (MSC)
MSC30-C. Do not use the rand() function for generating pseudorandom numbers
Pseudorandom number generators use mathematical algorithms to produce a sequence of numbers with good statistical properties, but the numbers produced are not genuinely random.
The C Standard rand()
function makes no guarantees as to the quality of the random sequence produced. The numbers generated ...
Get The CERT ® C Coding Standard: 98 Rules for Developing Safe, Reliable, and Secure Systems, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.