Variations in char type.

Q19. What are the variations in char type? How are the variations of char type different from one another?

Ans. The char type can also be signed and unsigned. Unlike int, char is neither signed nor unsigned by default. The choice is left to the C++ implementation in order to allow the implementer to best fit the type to the hardware properties. However, these distinctions are particularly important if you are using char as a numeric type. The unsigned char represents the range 0 to 255 and signed char represents the range -128 to 127.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: