As per the link https://www.geeksforgeeks.org/data-types-in-c/2
If we assume long int
takes 8 bytes (64 bits) then its range should be -2^63 to 2^63-1 , but that is not given in the link above. Why is it so?
And similarly unsigned long int
should have range between 0 to 2^64 .
Please tell what will be the range for float
, double
and long double
as it's not mentioned in link.
Because GeeksForGeeks is a known source of incorrectness and falseness. Don't trust in them. Trust in official standards and established authors with decades of experience (as you can find here on Stack Overflow - me excluded :-)).
The Definitive C Book Guide and List
Under this list you can find books of higher quality.
Beside that
long int
has commonly on the most implementations the same size as anint
, 4 byte.But as you said it is an assumption, it is completely correct to ask for.