What is the actual use of “signed” keyword?

后端 未结 4 1292
逝去的感伤
逝去的感伤 2020-12-15 15:16

I know that unsigned integers are only positive numbers (and 0), and can have double the value compared to a normal int. Are there any difference between

in         


        
4条回答
  •  鱼传尺愫
    2020-12-15 15:37

    There is no difference between the two where int's are concerned. You might include the word signed for formatting if you are also declaring unsigned int's so that they are easier to line up and make readable, but for all intents and purposes you don't need to use the signed keyword.

提交回复
热议问题