Posted on December 27, 2009
Fundamental / Basic / Primary Data Types in C Language
The fundamental data types are of following types:
Integer(int) data type:
Integers are whole numbers. They have no fractional parts. These integers are represented using int data type. Integers can be positive or negative. The integer variable consumes 2 bytes of memory in the code.
Character(char) data type:
An identifier or a variable which is declared as a char becomes a character variable. The character variable consumes 1 byte of memory in the code.
Float(Decimal or Real Number ) data type:
An identifier declared as a float becomes a floating-point variable or a decimal number. Any number which is having a fractional part is known as a floating point variable.
Double data type:
Double data type is also used for floating point numbers. But there is a difference in memory consumption. Float data type occupies 4 bytes of memory in the code whereas double occupies 8 bytes of memory i.e. twice as that of float.
These data types have some modifiers associated with it which we will be discussing in the next section.
More Articles From "C Programming" Category
- Variable Types in C Programming Language
- Derived Data Types in C Programming Language
- C Language Operator Types: Operators in C
- C Programming Primary Constants: Integer, Real & Character
- Constants in C Programming Language: Primary & Secondary
- Storage Classes in C Programming Language: Auto, Register, Extern & Static Storage Types
- C Data Types: Range & Size
- Type Modifiers in C Language: signed, unsigned, long & short
- C Language Data Types
- C Language Keywords