当前位置:网站首页>Integer inversion

Integer inversion

2022-07-07 09:53:00 Don't ask me y

1. The representation of signed numbers :-2^(n-1)——2 ^(n-1)-1
2.0x and h Are used to express 16 Base number ,0x Indicates prefix , stay c/c++ Must use 0x.
3.INT_MAX and INT_MIN On behalf of int Maximum and minimum values of type
The header file is included in <limits.h> In the definition of
INT_MAX=2147483647
#define INT_MIN (-INT_MAX - 1)
The minimum value cannot be defined directly , Because it's not a number , It's an expression , Negative for maximum , Because he has overflowed , So subtract 1.
4. Ternary expression : expression 1|| expression 2? result 1: result 2

原网站

版权声明
本文为[Don't ask me y]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130624178413.html