首先int、unsigned int之间的区别,int可以为负数,是有符号的;而unsigned int是没有符号的。
下面说一说int、long和long long的区别,众所周知int和long的长度是由操作系统决定的,没特殊情况int与long的长度是一样的,在32位操作系统中int就是int类型(long和int的长度相同,即取值范围int==long),而在64位的系统中可能就是long的类型(即取值范围long==long long)。
最后说一下nsiteger和nsuiteger,其实二者是动态的基础数据类型,为什么这么说,32位下nsiteger对应的就是int,nsuiteger对应的是unsigned int;而64位下nsiteger对应的long,nsuiteger对应的自然就是unsigned long。所以在开发的过程中建议使用nsiteger和nsuiteger,这样就不会因为的操作系统不同而产生不必要的问题。