Computer Science, asked by jaswantsandhu0, 7 months ago

what is the data types in c explain primary data types and user defined data types with the help of example ​

Answers

Answered by sahil10august
3

A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable in C has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable.

Primary data types:

These are fundamental data types in C namely

  • integer( int ),
  • floating point( float ),
  • character( char ) ,
  • and void

Data type Range

int

int signed int −32,768 to 32,767

unsigned int 0 to 65,535

short int

short int signed short int -2,147,483,648 to 2,147,483,647 (4 bytes)

unsigned short int 0 to 4,294,967,295 (4 bytes)

long int

signed long int -2,147,483,648 to 2,147,483,647 (4 bytes)

unsigned long int 0 to 4,294,967,295 (4 bytes)

Sahil

Similar questions