C Language Data Types

Posted on December 25, 2009

Data Types in C Language

Data can be of many types e.g., integer, fraction or real, character, string etc.

  • Numbers that does not have fraction part represents integer data.
  • Numbers with decimals or fraction represents real data.
  • Any data which is enclosed within single quotes represents character data.
  • Any data which is enclosed within double quotes represents a string.

Since the data is of many types, therefore C language provides many ways and options to handle all kind of data.

C Programming Language provides ways to handle different types of data by providing data types.

What is Data Type ?

“Data types” are defined as ways or means to identify the type of data and associated operations of handling it.

Data types can be divided into two types:

  • Fundamental or Built-in data types (Primary Data Types)
  • Derived data types ( Secondary Data Types)
  • User Defined data types

Built-in Data Types:

The basic built-in or fundamental data types that are available in C are:

  1. Char
  2. Int
  3. Float
  4. Double
  5. Void
1. Integer int
2. Character char
3. Floating Point float
4. Double precision floating point double
5. Void void

Derived Data Types:

The basic derived types that are available in C are:

1. Array
2. Functions and pointers
3. Structures
4. Classes etc..

User defined Data Types:

With the help of a user defined data type, a programmer can create an identifier that denotes an already existing data type. The programmer defined datatype identifier is then used in a program to declare variables.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Looking for a Fresher Job? Post Your Resume Free !!!

More Articles From "C Programming" Category

home | top