learn cpp

    2017年11月21日 字数:1872

Learn c

关键字

auto,break,case,char,const,continue,default,do,double,else,enum,extern,float,for,goto,if,inline,int,long,register,restrict,return,short,signed,sizeof,struct,wwithc,typedef,union,unsigned,void,volatile,while,_Bool,_Complex,_Imaginary

## 指令: Instruction 输入: Input 输出: Output 汇编器: Assembler 编译: Compile 可移植的: Portable 平台无关的: Platform Independent 计算机体系结构: Architecture 操作系统: Operating System 指令集: Instruction Set 解释: Interpret

Programming Language
  • Low-level Language
  • High-level Language
  • Machine Language
  • Assembly Language(汇编)

C 库

C89: assert.h,ctype.h,errno.h,float.h,limits.h,locale.h,math.h,setjmp.h,signal.h,stdarg.h,stddef.h,stdio.h,stdlib.h,string.h,time.h C95: (new) iso646.h,wchar.h,wctype.h C99: (new) complex.h,fenv.h,inttypes.h,stdbool.h,stdint.h,tgmath.h C11: (new) stdalign.h,stdatomic.h,stdnoreturn.h,threads.h,uchar.h 总共有 29 个标准头文件

C89 的15个标准头文件的主要内容如下:


assert.h 断言相关 ctype.h 字符类型判断 errno.h 标准错误机制 float.h 浮点限制 limits.h 整形限制 locale.h 本地化接口 math.h 数学函数 setjmp.h 非本地跳转 signal.h 信号相关 stdarg.h 可变参数处理 stddef.h 宏和类型定义 stdio.h 标准I/O stdlib.h 标准工具库 string.h 字符串和内存处理 time.h 时间相关 ——— ———– ———— ————– ————–

有人说,标准库(C89)——也就是ISO C——可以分为3组,根据这3组可

Knowleage

  • 0 除以任何一个数都得 0 可以整除,所以 0 与一个数的最大公约数是这个数本身
  • 小数 % 大数 = 0 余本身, 5 % 7 = 5
  • great common divisor(GCD)
  • 递归(recursion)
  • Fibonacci seauence
  • 迭代(lteration)
  • 累加器(accumulator)

Questions

  • 解释执行的语言相比编译执行的语言有什么优缺点?
  • 什么是 C side effect ?

Softwate

请我喝杯咖啡

取消

感谢您的支持,我会继续写出更优秀的文章!

扫码支持
扫码支持
请我喝杯咖啡

打开微信扫一扫,即可进行扫码打赏哦

comments powered by Disqus