- 1、本文档共18页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
IOS学习笔记001--整形变量修饰符介绍(国外英语资料)
IOS学习笔记001--整形变量修饰符介绍(国外英语资料)
IOS learning notes - plastic variable modifiers introduced
Presentation of plastic variable modifiers (modifiers include: int, short, long, [long, long], signed, unsigned)
1. Change the storage space of plastic variables
Short 2%hd short int a=4 bytes output occupies two bytes; -- printf (%hd\n, the name of the variable);
For example: short, int, a=1;
Short int a1=a15; / / A to left shift 15, negative numbers
A1= (a15 -1); / / left shift 15, the largest number of
Printf (d%\n, A1);
Short modified int accounted for two bytes, accounting for 16
The range of expression is:
1000000000000000 / the smallest negative -32768
0111111111111111 / the largest positive 32767
Int 4 bytes output by%d or%i -- four bytes
For example: int b=1;
Int b1=b31;
B1= (b31 -1); / / left shift 31
Printf (d%\n, B1);
The range of expression is:
1000000000000000 minimum negative -2147483648 -- 0000000000000000
0111111111111111 the 1111111111111111 largest positive -- 2147483647
Long 8 bytes output%ld -- eight bytes
For example: long, int, c=1;
Long int c1=c63; / / left shift 63
C1= (c63) -1;
Printf (C1 = ld%\n, C1);
The range of expression is:
1000000000000000 0000000000000000...(total of 64) / minimum negative -9223372036854775808
0111111111111111 1111111111111111...(total of 64) -- maximum positive 922337203685477580
Long long 8 bytes output by lld% (mainly in order to solve the problem of 32 bit machines) -- eight bytes
Note: all modifiers are used to modify plastic variables.
* long long type
In the 32 bit system:
Long occupies 4 bytes (changing the storage space of the shaping variable)
Long long makes up 8 bytes
In the 64 bit system:
Long occupies 8 bytes
Long long makes up 8 bytes
2. Change the symbols of plastic variables
The signed representation is symbolic (computer default is signed)
The unsigned representation is an unsigned number (changing the symbol of the shaping variable, which doubles the value of the positive number) The
您可能关注的文档
- ApacheJKTomcat 负载平衡配置(国外英语资料).doc
- APDL-两向正交正放网架(国外英语资料).doc
- ACCESS自动编号如何恢复从1开始的方法(国外英语资料).doc
- Android系统文件夹结构名称的说明及怎样获得系统root权限的方法(国外英语资料).doc
- Aprior算法 C#语言 频繁项目集的生成(国外英语资料).doc
- ARP概念及攻击与防护的原理(国外英语资料).doc
- A001父母心理健康状况对孩子的影响(国外英语资料).doc
- as3试题(国外英语资料).doc
- ASA5520实施IPSec+SSL+ACS成功案例(国外英语资料).doc
- ATM管理与维修的一些经验和体会(国外英语资料).doc
文档评论(0)