Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What are the data types of C language?
What are the data types of C language?
short、int、long、char、float、double

These six keywords represent six basic data types in C language.

These types occupy bytes of different lengths on different systems:

At the age of 32

Bit system

short

The occupied memory size is 2 bytes; ;

The memory size occupied by int is 4.

One byte; ;

Long occupies a memory size of 4.

One byte; ;

The memory size occupied by float is 4.

One byte; ;

The memory size occupied by double is 8.

One byte; ;

The memory size occupied by char is 1.

One byte.

You can test it with sizeof.

Extended data:

C language is a general computer programming language, which is widely used in the bottom development. The design goal of C language is to provide a programming language that can compile and process low-level memory in a simple way, generate a small amount of machine code and run without any support of running environment.

Although C language provides many low-level processing functions, it still maintains good cross-platform characteristics. C language programs written in standard specifications can be compiled on many computer platforms, even including some embedded processors (single chip microcomputer or MCU) and supercomputers.

References:

C language Baidu encyclopedia