Variables and Data Types - C Language Basics

C examples for Language Basics:Variable

Introduction

Variables are used for storing data during program execution.

The simple types in C consist of four integer types, three floating-point types and the char type.

In C, the exact size of the data types is not fixed.

Data Type                          Size (byte)                       Description

char                               1                                Integer or character

short                              2                                Integer
int                                4
long                               4 or 8
long long                          8

float                              4                                Floating-point number
double                             8
long double                        8 or 16

Related Tutorials