2019年3月21日
摘要: 参考:https://mp.weixin.qq.com/s?__biz=MzUyNjQxNjYyMg==&mid=2247483905&idx=1&sn=79512c5e81bc2e8e3095c6ff592e8ed2&scene=19#wechat_redirect 冒泡排序(C语言版):时间复杂 阅读全文
posted @ 2019-03-21 18:44 kingofloong 阅读(475) 评论(0) 推荐(0) 编辑
摘要: 参考:https://mp.weixin.qq.com/s?__biz=MzUyNjQxNjYyMg==&mid=2247483979&idx=1&sn=b8154f94771a7509f44139e667a2ef84&scene=19#wechat_redirect 插入排序(C语言版):时间复杂 阅读全文
posted @ 2019-03-21 15:36 kingofloong 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 参考:https://mp.weixin.qq.com/s?__biz=MzUyNjQxNjYyMg==&mid=2247484043&idx=1&sn=3743a5e3f79fba00ca794704e0c5a1ba&scene=19#wechat_redirect 计数排序(C语言版):空间复杂 阅读全文
posted @ 2019-03-21 09:46 kingofloong 阅读(1063) 评论(0) 推荐(0) 编辑
  2019年3月3日
摘要: 内核空间 应用程序不允许访问 3G 栈空间 局部变量 RW 运行时的堆空间 malloc 全局的数据空间(初始化的,未初始化)static RW data(数据段) 、bss(未初始化的数据段) 只读数据段 (“Hello world”) R text(代码段) 代码段(code) R text / 阅读全文
posted @ 2019-03-03 19:11 kingofloong 阅读(241) 评论(0) 推荐(0) 编辑
  2019年3月2日
摘要: const:常量、只读【不能变】 char *p; const char *p; 【T】 字符串内容可以为“hello world”或“aaa”,但只读(不可修改) char const *p; char * const p; 【T】 一般为硬件资源 ,地址不变,但地址内容可变。 char *p c 阅读全文
posted @ 2019-03-02 22:25 kingofloong 阅读(315) 评论(0) 推荐(0) 编辑
摘要: <<、>> ① << 左移 乘以2^n m << n m*(2^n) eg:4: 0 0 1 0 0 8: 0 1 0 0 0 [数据、数字]移位 左移:右侧补0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 阅读全文
posted @ 2019-03-02 14:46 kingofloong 阅读(455) 评论(0) 推荐(0) 编辑
摘要: auto eg:aoto int a; 默认情况 >分配的内存可读可写的区域。 register eg:register int a; 限制变量定义在寄存器上的修饰符 定义一些快速访问的变量。 编译器会尽量安排CPU的寄存器去存放这个a,如果寄存器不足时,a仍存放在存储器中, "&"该符号对regi 阅读全文
posted @ 2019-03-02 12:46 kingofloong 阅读(367) 评论(0) 推荐(0) 编辑
  2019年2月27日
摘要: struct 结构体 (地址递增) eg:struct myabc{ unsigned int a; unsigned int b; unsigned int c; unsigned int d; }; 注: int i; struct myabc buf; //struct myabc等同于int 阅读全文
posted @ 2019-02-27 23:27 kingofloong 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 关键字: sizeof为关键字,并不是函数。 作用:编译器给我们查看内存空间容量的一个工具。 eg:int a; printf("the size is %d\n",sizeof a); printf("the size is %d\n",sizeof (a)); //注:int的大小跟编译器有关。 阅读全文
posted @ 2019-02-27 22:28 kingofloong 阅读(462) 评论(0) 推荐(0) 编辑
摘要: # 字符串化 ## 连接符号 eg: 阅读全文
posted @ 2019-02-27 11:35 kingofloong 阅读(724) 评论(0) 推荐(0) 编辑