Home  >  Article  >  Backend Development  >  What does \101 mean in c language?

What does \101 mean in c language?

下次还敢
下次还敢Original
2024-04-13 18:57:131194browse

In C language, 101 represents a decimal integer constant whose value is one hundred and one. Numeric constants in other bases include octal (prefixed by 0) and hexadecimal (prefixed by 0x or 0X), but the number 101 is not a valid octal or hexadecimal constant.

What does 1 mean in c language?

In C language, the meaning of 101

In C language, 101 is a decimal integer constant, It represents the number one hundred and one.

Decimal numeric constants

Decimal numeric constants are composed of numbers 0 to 9, representing integers. They do not require any prefixes or suffixes and can be written in any order.

Integers

Integers are the set of positive and negative numbers as well as the number 0. In C, integers are represented using the int data type, whose size and range depend on the compiler and platform used.

Example:

<code class="c">int num = 101;

// num 的值现在为 101</code>

Other base constants

In addition to decimal numeric constants, C language also supports other base systems Numeric constants, including:

  • Octal: Prefixed by the number 0
  • Hexadecimal: Prefixed by the number 0x or 0X Prefix

Note: The number 101 is not a valid octal or hexadecimal constant.

The above is the detailed content of What does \101 mean in 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