h Home

C Programming:


Data types in C

The C programming language offers various data types to suit different purposes. They can be broadly categorized as follows:

•Basic data types
•Derived data types
•User defined data types
In c, all variables must be declared before they are used,usually at the begining of the function before any executable statements.

Variables must begin with a letter or underscore, and may be fallowed by any combination of letters(upper or lower case), underscores or the digits 0-9.

Declaring variables


A declaration announces the properties of variables; it consists of a datatype name and a list of variables.

A variable may also be initialised in its declaration.

A c program whatever may its size,consists of functions and varibles. A function contains statements that specifies the computing operations to be done and variables store values during the computation.

Basic data types


The C programming language provides the user with four basic datatypes.

Basic data types
Data type Description
int An integer.
float A floating point(real) number.
char A single of byte of memory,enough to hold a charecter.
double A double precision floating point number.

Data type qualifiers


The C programming language provides the user with three basic datatype qualifiers.

Data type qualifiers
type qualifier Description
short An integer possiably of reduced range.
long An integer possiably of incrased range.
unsigned An integer with no negetive range, the spare capacity being used to increase the positive range.


      We provide Data types in C for the educational purposes only. We do not responsiable for the correctness of its contents. the risk of using it lies entirelywith the user.