Home > Backend Development > C#.Net Tutorial > What does long type mean in C language?

What does long type mean in C language?

藏色散人
Release: 2020-02-10 10:27:05
Original
13300 people have browsed it

What does long type mean in C language?

#What does the long type in c language mean?

1. Long is a keyword in C language, representing a data type, and Chinese is long integer.

2. Long is the abbreviation of long int, that is to say, in C language, the long int type and the long type are the same.

3. Each long type occupies 4 bytes. Under a 32-bit compilation system, long and int occupy the same space. This has also led to the use of long variables less and less.

4. The range of integer numbers that the long type can represent is -2,147,483,648 ~ 2,147,483,647, that is, -2^32 ~ 2^32-1.

When used in C formatted input and output, the long formatting character is "%ld".

5. Long, like other integer types, can be used in conjunction with unsigned to form unsigned long, which is an unsigned long integer type, and its formatting character is "%lu".

6. Under some compilers, such as gcc, two longs are used together, that is, long long type, which represents the longest system integer type in C language. Each long long type occupies 8 bytes, 64 Bit. Its formatting character is "%lld".

Recommended learning: c language video tutorial

The above is the detailed content of What does long type mean in C language?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template