The range of long is -2^31~2^31-1.
The long keyword represents a type of long integer data, which is a basic data type in programming languages. It is the abbreviation of long int. The default is signed long integer type, containing 4 bytes.
Expand knowledge
C language is a process-oriented, abstract, general-purpose programming language that is widely used in low-level development. C language can compile and process low-level memory in a simple way. C language is a high-efficiency programming language that only generates a small amount of machine language and can run without any operating environment support.
Main features
1. Concise language. C language contains only 9 types of various control statements and only 32 keywords. The writing requirements of the program are not strict and mainly use lowercase letters, and many unnecessary parts are streamlined. In fact, few statement components are related to hardware, and the C language itself does not provide hardware-related input, output, file management and other functions.
2. Have structured control statements. C language is a structured language that provides control statements with structured features, such as for statements, if...else statements, and switch statements. It can be used to implement logical control of functions and facilitate process-oriented programming.
3. Rich data types. C language contains a wide range of data types, including not only traditional character types, integer types, floating point types, array types and other data types, but also data types that other programming languages ??do not have. Among them, pointer type data is the most flexible to use. Computations can be performed on various data structures through programming.
4. Rich operators. The C language contains 34 operators, which treat assignments, parentheses, etc. as operators, making the C program rich in expression types and operator types.
5. The physical address can be directly operated. C language allows direct reading and writing of hardware memory addresses, so that the main functions of assembly language can be realized and the hardware can be directly operated. C language not only has the good characteristics of high-level languages, but also contains many advantages of low-level languages, so it is widely used in the field of system software programming.
6. The code has good portability. C language is a process-oriented programming language. Users only need to pay attention to the problem itself, and do not need to spend too much energy to understand the relevant hardware. For different hardware environments, the code when using C language to implement the same function Basically the same, no or only a few changes are needed to complete the transplant.
7. It can generate high-quality programs with high target code execution efficiency. Compared with other high-level languages, C language can generate high-quality and efficient target code, so it is usually used in the writing of embedded system programs that require higher code quality and execution efficiency.