Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Is it correct that C language accepts numbers in any base system?
Is it correct that C language accepts numbers in any base system?

Probably not

In C language, or in computers, all numbers are stored in binary. Other bases include octal and decimal. Both hexadecimal and hexadecimal formats are readable by humans. In C language, integer constants can be represented in three ways: octal, decimal, and hexadecimal.

1Constants starting with 0, such as 0112, 0531, etc., are expressed in octal notation.

2 Those starting with 0x or 0X are hexadecimal, such as 0x12, 0xABC.

3 Those without any prefix are decimal, such as 123, 812 .

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 an efficient programming language that only generates a small amount of machine language and can run without any operating environment support.