Tuesday 24 June 2014

What are data type modifiers and their affect on base data type.





Data type modifiers and their affect on base data type.




The keyword which appear before the data type and which changes its meaning , are modifiers.These are signed , unsigned , short, and long . When data type modifiers appears before a type , the meaning of the data type changes in the sense that the size gets affected.

For the sake of example let's see

An int is by default 2 bytes long and hence can represent values -32768 to 32767 but when modifier unsigned appears before it , its range becomes 0 to 65,535.

No comments:

Post a Comment