Is there any way to get the Limit of Data type in C. Let us take for character data type have 255 is the Limit. so for each and every data type certain limits are there..... so how to get those types at run time.... is it possible means how?????
The limits for integer types (char, short, int long plus unsigned varieties) are all #defined in limits.h
float.h contains similar information for float, double and long double.
Oh and 255 is only the limit for char on systems where char is unsigned. On systems where char is signed (which is quite a lot of them) the limit is 127.
There r anoher type of solution that we take a array of any data type and and store the any number them .after this we have difference betwween second and first address of array and print it it will be range of data type in byte
The limits for integer types (char, short, int long plus unsigned varieties) are all #defined in limits.h
float.h contains similar information for float, double and long double.
Oh and 255 is only the limit for char on systems where char is unsigned. On systems where char is signed (which is quite a lot of them) the limit is 127.