Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - The method of converting hexadecimal into decimal in C language
The method of converting hexadecimal into decimal in C language
You can use

int main(){ int a = 1 10; char p; _itoa( 1 10,p, 16); // 16 means 16, or 2,8, 10printf("%s ",p); Returns 0; }

GCC, an open source free compiler developed by GNU organization, MinGW, GCC and Clang under Windows operating system, is an open source compiler based on BSD protocol LLVM.

Extended data:

Operation symbol:

More specifically, the bits are shifted to the right (>; >) operator can be an arithmetic shift (most significant bit on the left) or a logical shift (zero on the left). For example, if1111is shifted to the right by 3 digits, it will become11100 after arithmetic right shift, and the logic will be shifted to the right. Almost all compilers will shift the arithmetic bit to the right because it is more suitable for dealing with integers with negative signs.

The priority of operators from high to low is monocular operator, arithmetic operator, relational operator, logical operator, conditional operator, assignment operator (=) and comma operator.

Baidu encyclopedia -c language