Difference between unsigned and unsigned int in C

无人久伴 提交于 2019-11-26 08:22:37

问题


Could you please make it clear what the difference is between unsigned and unsigned int? Maybe some example code would be helpful.


回答1:


unsigned is a modifier which can apply to any integral type (char, short, int, long, etc.) but on its own it is identical to unsigned int.




回答2:


There is no difference. unsigned and unsigned int are both synonyms for the same type (the unsigned version of the int type).




回答3:


unsigned alone means unsigned int. You can also use unsigned char, etc. I have no idea what happens if you try unsigned double or unsigned float. Anybody know?




回答4:


unsigned indicates that it's unsigned int. So they are equivalent.




回答5:


They are exactly the same thing.



来源:https://stackoverflow.com/questions/7176657/difference-between-unsigned-and-unsigned-int-in-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!