Talk:c/language/arithmetic types
From cppreference.com
why does arithmetic types page not talking about enum?
isn't type enum compatible with integer?
- They have their own page at c/language/enum. You can get there from this page by following the link in "(See also type for type system overview " and the link to enumerated types from there. --Cubbi (talk)
Page says int and char can be the same size, is that right?
If int and char are the same size, then fgetc() doesn't make sense. unsigned char uses a pure binary representation (no padding bits, all n = CHAR_BIT bits are value bits), so there are 2**n byte values that fgetc() might need to return. But if int is the same size, there are only 2**n int values, which leaves no spare value for EOF. EOF would be ambiguous with a byte that could exist in the input.