data types in c

Data types in c language

Data types :

      Data types refers storage capacity, range and types of information.
It divide into four major categories.

⇒ Primary data type
⇒ Derived data type
⇒ Void data type
⇒ User defined data typedata types in c

⇒ primary data type :
      A data type which provide by c library is known as a primary data type. it is also known as built in or basic data type. it divide into three categories such as


    → integer types
    → character types
    → floating-point types

→ integer types :
      A data type which can hold only numeric or decimal value without Precision point is known as integer data type.
there are three type of integer data such as


    • Integer
    • Shot integer
    • Log integerinteger type data in c


• integer :
      In 16 bit machine it has capacity of 2 bytes or 16 of bit memory. range between -32768 to +32767 it has signed integer and unsigned integer but default is signed integer. signed integer can hold positive as well as negative values where unsigned integer can hold only positive value and range is between 0 to 65535.

• short integer :
      In 16 bit machine its capacity is 1 byte or 8 bit of memory. also has signed short integer and unsigned short integer. unsigned short integer range is between 0 to 255.

• long integer :
      As per 16 bits system it required 4 bytes or 32 bits of memory. range is between -2,14,74,83,648 to +2,14,74,83,647. it also has signed and unsigned long integer, unsigned long integer has a capacity from 0 to 4,29,49,67,295.

→ character types :
      Character data type can hold alphanumeric or special symbol values. keyword is char to define character data type. It required 1 byte of memory or 8 bit according to 16 bit machine. range is between -128 to +127. it has also unsigned and signed character but default is a signed character. range of unsigned character is 0 to 255.character type data in c

→ floating point types :
      A data type which used to store floating point type value or precision type value is known as a floating point data type.it divide into three categories such as

    • foat

    • double

    • long doublefloating type data in c


• Float :
      It required 4 byte or 32 bits of memory. range of floating point data type is between 3.4E-38 to 3.4E+38. maximum floating Precision is upto 6 points, upto 6 Precision points are default in C programming.


• Double :
      This data type is same as float data type but it extend the storage capacity of the variable, it required 8 bytes or 16 bits of memory. "double" keyword is used to define double data type. range is 1.7E-308 to 1.7E+308.


• Long double :
      This data type is biggest data type in C programming, it required 10 bytes or 80 bits of storage capacity."long double" keyword is required to store information of long double data type. range is between 3.4E-4932 to 3.4E+4932.

⇒ void type :
      Void means nothing to written generally used in function.

« inportance of Tokens in C programming

» operators in c programming

Learn C programming language