How to calculate the octal long integer constant 0 177777L? Equal to 65535, but without l, 0 17777 is equal to-1. What is the difference?
The octal long integer 0 177777L is equal to 10 and the decimal long integer 65535. If there is no L after it, it means an integer. The reason why it becomes-1 here is because a 16-bit compiler is used. In the 16 bit environment, the value range of signed integer int is -32767 ~ 336. A *** 16 bit, the highest bit is 1, so it is negative, and the complement behind it is 1, so the value of 0 17777 converted into 16 bit integer is-1.