auto为C语言局部变量的默认属性

static指明变量的静态属性,也具有作用域限定符的意义

static修饰的全局变量作用域只是生命的文件中,修饰的函数作用域只是声明的文件中

register指明将变量存储于寄存器中,只是请求寄存器变量,不一定请求成功。register变量必须是CPU寄存器可以接受的值,不能用&运算符获取其地址。变量长度必须是CPU可接受的。

auto变量存储在程序的栈中,默认属性

static存储在程序静态区中

register变量请求存储在CPU寄存器中

全局变量不能为auto和register。

全局变量和局部变量存储在内存静态区,register变量存储在寄存器,局部变量存放在栈区。所以,不能定义auto,或者register的全局变量。

静态局部变量只会被初始化一次。

2017年1月4日 16:16:24开始学习Linux——好像回到上次发随笔的时间。的更多相关文章

  1. 【2017年9月10日更新】ABP配套代码生成器(ABP Code Generator)帮助文档,实现快速开发

    ABP代码生成器介绍 ABP Code Generator 针对abp这个框架做了一个代码生成器,功能强大.分为两大功能点,一个是数据层,一个是视图层. 数据服务层:通过它,可以实现表设计.领域层初始 ...

  2. 猖獗的假新闻:2017年1月1日起iOS的APP必须使用HTTPS

    一.假新闻如此猖獗 刚才一位老同事 打电话问:我们公司还是用的HTTP,马上就到2017年了,提交AppStore会被拒绝,怎么办? 公司里已经有很多人问过这个问题,回答一下: HTTP还是可以正常提 ...

  3. 2017年1月5日 星期四 --出埃及记 Exodus 21:31

    2017年1月5日 星期四 --出埃及记 Exodus 21:31 This law also applies if the bull gores a son or daughter.牛无论触了人的儿 ...

  4. 2017年1月4日 星期三 --出埃及记 Exodus 21:30

    2017年1月4日 星期三 --出埃及记 Exodus 21:30 However, if payment is demanded of him, he may redeem his life by ...

  5. 2017年1月3日 星期二 --出埃及记 Exodus 21:29

    2017年1月3日 星期二 --出埃及记 Exodus 21:29 If, however, the bull has had the habit of goring and the owner ha ...

  6. 2017年1月2日 星期一 --出埃及记 Exodus 21:28

    2017年1月2日 星期一 --出埃及记 Exodus 21:28 "If a bull gores a man or a woman to death, the bull must be ...

  7. 2017年1月1日 星期日 --出埃及记 Exodus 21:27

    2017年1月1日 星期日 --出埃及记 Exodus 21:27 And if he knocks out the tooth of a manservant or maidservant, he ...

  8. 2017年1月8日 星期日 --出埃及记 Exodus 21:34

    2017年1月8日 星期日 --出埃及记 Exodus 21:34 the owner of the pit must pay for the loss; he must pay its owner, ...

  9. 2017年1月7日 星期六 --出埃及记 Exodus 21:33

    2017年1月7日 星期六 --出埃及记 Exodus 21:33 "If a man uncovers a pit or digs one and fails to cover it an ...

随机推荐

  1. bugs

    2016-09-04 10:24:14.503 Scgl[1035:341694] You've implemented -[<UIApplicationDelegate> applica ...

  2. css设置背景图片

    background:pink;图片在背景图上面 background-image:url(food.jpg);一张图片铺满一行background-repeat:repeat-x;同一张图片多张铺满 ...

  3. C语言:使用命令行参数用字符串读取流和输出流进行文本文件的复制

    #include<stdio.h> int main(int argc,char *argv[]) { //检查用户的参数是否正确 if(argc<3) { printf(" ...

  4. [SharePoint 2013] Create event receiver for external list

    Main list for creating event receiver for external list Subscribe   storage, it could be data table ...

  5. 通过批处理来运行python程序

    >准备 >>在所用的python源程序最前面指定该源程序要用那种可执行程序去运行它 >>例如: #!/bin/sh shell脚本 #!/usr/bin/perl per ...

  6. [Android Tips] 23. How to fail/stop Gradle task immediately if some conditions are not met

    throw new GradleException("conditions are not met") 参考 How to fail/stop task immediately i ...

  7. ARM 开发工具 Keil和DS-5的比较。

    http://www.eeboard.com/bbs/thread-25219-1-1.html 如今ARM体系架构的处理器在嵌入式市场上呼风唤雨,从低端的MCU应用到高端的多媒体消费电子,移动设备领 ...

  8. MWeb 1.4 新功能介绍一:引入文件夹到 MWeb 中管理,支持 Octpress、Jekyll 等静态博客拖拽插入图片和实时预览

    之前在 MWeb 中打开非文档库中的 Markdown 文档,如果文档中有引用到本机图片,是没办法在 MWeb 中显示出来和预览的.这是因为 Apple 规定在 Mac App Store(MAS) ...

  9. 《量化投资:以MATLAB为工具》连载(2)基础篇-N分钟学会MATLAB(中)

    http://www.matlabsky.com/thread-43937-1-1.html   <量化投资:以MATLAB为工具>连载(3)基础篇-N分钟学会MATLAB(下)     ...

  10. position

    1.父集设置了relative,子集的absolute要设置top和left的值,不然父集的padding值会影响到子集的位置: #first{ width: 200px; height: 100px ...