C++学习笔记coursera(2/6)

课程名称:C for Everyone: Programming Fundamentals
课程内容:C/C++
课程网址:https://www.coursera.org/learn/c-for-everyone/home/week/1
课程进度:Week2

Week2

Character sets and tokens
Lexical词汇的
Element元素,要素
Punctuation标点符号
Inform知会,通知,告知
Slash / asterisk * backslash \ star *
Comments注释
Preprocessor directives预处理命令
Sharp #
Indicate 指示
Library standard libraries
Token
Unary 一元的
Plus 和,加,外加,也
Identifiers a,b,main
Operators +,&
Punctuation {,},;
Syntax句法
Paren ( )
Semantically语义上地
Parse对…进行语法分析

Comments
Discard丢弃,抛弃
Recall收回,召回
/* */ //

Keywords
Reserved keyword
Enum枚举类型
Obsolete过时的,淘汰的,废弃的
Compound化合物,复合物
Exceed超过,超越
Migrate迁移,迁徙
Main不是keyword(虽然约定int main使用)

Identifiers
Int main int是keyword main是identifier
Underscore强调,着重说明,下划线 underscore characters
Subscript下标
Arbitrarily任意地,随意地
Conform符合
Auxiliary辅助的,备用的
Underbar 下划线 _
Distinct不同的
#不能用于组成identfier
Identifier的第一个字母不能是数字
Convention公约,协定,协议,惯例
Context上下文,背景,环境
Obscure模糊的
Evaluation评价,评估,估计
Capitalized 大写的
Constant常数
Abide遵守,接受,遵照

Operators
Precedence优先,优先权
Increment增量 decrement
Unary plus unary minus
Negation(n.)否定,拒绝,反面
Prefix前缀
Modulo % divide /
Greater than equal >= less than equal <=
Ampersand &
Overuse滥用,使用过度
Ternary三元的
Esoteric秘传的,机密的
Comma逗号
Subtle微妙的,狡猾的,巧妙的
Override优先于,压倒,不理会
parenth ( )
reinforce加强,加固
implicit含蓄的,完全的,内含的
literal字面意义的

Expressions and procedure(File included +)
Precendent先例,实例,传统,范例
Associativity结合性,可结合性
Variable(n.)变量(adj.)可变的
Assignment statement赋值语句 assignment expression
Assign分配,指定,转让,派遣
Sequence顺序,次序,序列
Negation否定,拒绝,反面
Exclamation感叹号
Arithmetic算术,计算,算术的
Remainder余数
Substraction减法
Overwhelm压倒,淹没,压垮

Expression and evaluation
Inspiration灵感,好主意
A times b parenthesize c a*(b+c)
Gotchas问题
Floating point constant
Abbreviate缩写
Pre-increment a=++b ->b=b+1;a=b;前缀++是先b自增然后操作增加了的b
Post-increment a=b++ ->a=b;b=b+1;后缀++是先操作b的原值然后b再自增

Declarations
Assignment
Precisely精确地
Scientific科学的
Arbitrarily任意地,随意地
Purely完全,仅仅
Rounding error舍入误差
Convertion转换

Fundamental types and sizeof
Fairly相当地
Int double char
Intuitively直观地
Lowercase小写字母uppercase大写字母
Scientific notation
Notation符号,记号,记法
Exponent指数
Designate指定
3.2e5 320,000
Modifier修饰语
Critical关键的,严重的,批评的
Unsigned
Long
Float
Double
Long double
Infinite无限的,极大的 finite有限的
Decimal小数的,十进制的
Doable可行的
Resource资源
Conventionally照惯例
Quantum(n.)量子
Int 4bytes -2147483648 +2147483647=2的32次方-1
Sizeof()可填type可填variable都能正确输出
Universally到处,一致地
Semantic语义的
Efficient生效的,效率高的

The char type(File included +)
Constituent成分
Sentinel character哨兵字符
Literal字面意义的
Single quote ‘ ‘
Adjacent相邻,邻近的
ASCII ‘A’ 65 ‘Z’ 90 ‘a’ 97 ‘z’ 122 ’0‘ 48 ’9‘ 57 ‘[‘ 91 ‘+’ 43
‘\n’ 10 换行
‘\a’ 7 ring bell
Char “%c”
Squential顺序的,按次序的,连续的
Interpret解释,口译,说明
Consecutive连续的,连续不断的
Printf(“…%c%c%c\n”,’\a’,’\a’,’\a’);

The int type
Manipulate控制,操纵
Int(short,long,unsigned)
Stuff东西
Obscure模糊的
Entire整个的
Int stored in 32bits(4bytes)
Octal八进制
Hexdecimal十六进制的
Explicitly明确的,明白的
Symmetric对称的
Complement补充,补足
Ordinary普通的,一般的
Short 2bytes
Long 8bytes
Domain域,领域,范围
35 int 35l long 35u unsigned 35ul unsigned long
在这里插入图片描述
Format格式
Operation运算
Extend延申
Endless无休止的,不断的
Weird奇怪的
%hd

The integer and floating point types(Files included +)
Float 4bytes double 8bytes long double
Float 10的-38次方 10的38次方
Double 10的-308次方 10的308次方
Exponent指数
Fractional分数的,小数的
Significant重要的,有重大意义的,有意义的
Conserve保护,节约,保存,节省
Conceivably可想而知
Distinguish区分
Decimal小数的,十进制的
1.0 1. 0.1e1效果是相同的都是float
Ostensibly表面上
Precision(n.)精确,准确,细致
Numerical数字的
Internal内部的
%e %E 1.23456e+00
%f 1.23456
%g %G 会在%e和%f中自动选短的使用
Arithmetic算术
Strategy战略,策略,规划
在这里插入图片描述在这里插入图片描述
Indent缩进,缩格
Brace大括号
<math.h> sin() sine function
Encapsulation封装
两种求平均值的方式如下
在这里插入图片描述
第一种可以有效防止过大越界,是否还有其他好处?

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值