Home>Article>Backend Development> What are the legal data type keywords provided by C language?

What are the legal data type keywords provided by C language?

藏色散人
藏色散人 Original
2020-08-29 11:28:59 26194browse

The legal data type keyword provided by the C language is "float", which is a floating-point data type used to store single-precision floating-point numbers or double-precision floating-point numbers. The single-precision value of the floating-point type has 4 Bytes, including a sign bit, an 8-bit binary exponent and a 23-bit mantissa.

What are the legal data type keywords provided by C language?

Recommendation: "c Language Tutorial"

The legal data type keyword provided by the c language is "float ” is a floating-point data type, used to store single-precision floating-point numbers or double-precision floating-point numbers. Floating point numbers use IEEE format.

Single-precision values of floating-point type have 4 bytes, including a sign bit, an 8-bit binary exponent, and a 23-bit mantissa. Since the high-order bit of the mantissa is always 1, it is not stored as a number. This representation gives float types a range of approximately -3.4E 38 ~ 3.4E 38 .

Related introduction:

The keywords of legal data types in C language are generally divided into: int (integer type), float (single precision type), double (double precision type) and char (Character type). In addition to these four basic types, there are also some data type modifiers, including long (long integer), short (short), signed (signed) and unsigned (unsigned).

The above is the detailed content of What are the legal data type keywords provided by C language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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