Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is getrandmax() a fix number?

In getrandmax() i get a value max of 2147483647
It is the same on all the computer, or does it change and can be increased/decresed ?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

getrandmax() will typically be tied to the system architecture. The highest unsigned number.

For example 2147483647 is 2^31-1.

Other systems may have 2^15-1 = 32767 (documented as on some Windows systems).

I’ve yet to see a 64 bit version. But it would be 2^63-1 = 9223372036854775807.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading