What are the four major data types of C language? The following article will introduce to you the four major data types of C language. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
Information in the real world exists in various ways and is expressed in different ways, such as integers, real numbers, characters, etc. This information must also be organized and stored in a certain way in the computer to facilitate analysis of storage space and calculation.
C language divides data into multiple types. Different data types have different storage lengths, gathering ranges and allowed operations.
There are four main data types in C language, which are as follows;
1. Basic data types: The so-called "basic" refers to data types whose values cannot be decomposed. C language The basic data types include integer, real, character and enumerated types.
2. Constructed type: Use one or more existing data types to construct a new data type; for example, array, structure and union types, etc.
3. Pointer type: a special data type used to represent the internal address of a variable.
4. Empty type: void, often used to define functions without return values.
Recommended: "c Language Tutorial"
The above is the detailed content of What are the four major data types in C language?. For more information, please follow other related articles on the PHP Chinese website!