Sunday, 4 March 2012

Data Types in C Language

Data Types
C offers a variation of the integer data type that provides what are called short and long integer values. The intention of providing these variations is to provide integers with different ranges wherever possible. Though not a rule, short and long integers would usually occupy two and four bytes respectively. Each compiler can decide appropriate sizes depending on the operating system and hardware for which it is being written, subject to the following rules:
(a)
(b)
(c)
(d)
shorts are at least 2 bytes big
longs are at least 4 bytes big
shorts are never bigger than ints
ints are never bigger than longs

No comments:

Post a Comment