I was reading a old C book and according to that
int range values from -32768 to +32767.
where as my machine can hold a larger int than that limit how can I find the range of these data types(short, int, long, double, float) specific to my machine?
are there any methods for that?
From this, take a look at the footnote:
If you run the following code on your system, it should shed some insight because the value returned may or may not differ from the ones in the above link.
I hope I understood your qestion correctly.
You can take a look at
limits.h
, where you can find the sizes of integral types. Take a look here.Header
<limits.h>
provides these informations while<stdint.h>
allows you to specify specific width integers: