C character set, Data types

 

A character denotes any alphabet, digit or special symbol used to represent information.

C Character set

Data types

 

—  Data types are used to declare the identifiers or variables to store the data.

—  Data types used in C are categorized in two types. They are:

—  Basic data type

—  User defined data type

—  Basic data types are standard and predefined, whereas user defined data types are created according to the requirement in order to continue basic data type variables.

—  Basic data type : char, int, float, double

—  User defined data type is created by using either struct or union.

 

—  In C, basic data types used are: char, int, float, double.

 

  1. Primary (or fundamental) data types
  2. User-defined data types
  3. Derived data types
  4. Empty data set

 

Data Type
Size
Range

char

1 byte

-128 to 127

Int

2 bytes

-32,768 to 32,767

float

4 bytes

3.4e-38 to 3.4e+38

double

8 bytes

1.7e-308 to 1.7e+308

 

Integer Data Type

 

Type

Length

Range

Unsigned int (or)

unsigned short int

16 bits

0 to 65,535

int (or)

short int (or)

signed int (or)

signed short int

16 bits

-32,768 to 32,767

Unsigned long (or)

Unsigned long int

32 bits

0 to 4,294,967,295

long (or)

long int (or)

signed long int

32 bits

-2,147,483,648 to 2,147,483,647

 

Floating point Data Type

 

Type

Length

Range

float

32 bits

3.4e-38 to 3.4e+38

double

64 bits

1.7e-308 to 1.7e+308

long double

80 bits

3.4e-4932 to 1.1e+4932

Character Data Type

 

Type

Length

Range

unsigned char

8 bits

0 to 255

char (or )

signed char

8 bits

-128 to 127

 

 

 

Registration


A password will be e-mailed to you.

Feedback Form

Name (required)

Email (required)

Feedback