There are basically three data types in c language:

1) Constants-
A constant is an entity that doesn’t change whereas a variable is an entity that may change.


Types of C Constants:
C constants can be divided into two major categories:
(a) Primary Constants
These are again divided into three types as:

  •  Real constants
  •  Integer constants
  •  Character constants

(b) Secondary Constants
These are again further divided into :

  • Arrays
  • Pointers
  • Structures
  • Union etc










Rules for Constructing Accumulation Constants:

  1. An accumulation connected accept only atomic digit.
  2. It can accept  a decimal point.
  3. It can be either absolute or negative.
  4. If no assurance precedes an accumulation connected it is affected to be positive.
  5. No commas or blanks are accustomed aural an accumulation constant.
  6. The acceptable range for accumulation constants is -32768 to 32767.



Rules for real constants:

  1. At least one digit is compulsory.
  2. It can accept  a decimal point.
  3. It could be either absolute or negative.
  4. Default assurance is positive.
  5. No commas or blanks are accustomed aural a absolute constant.integer constants is -32768 to 32767.


0 comments to "DATA TYPES"

Post a Comment

Powered by Blogger.