- 1、本文档共15页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Data Types and sizes Variable Names Names are made up of letters, digits and underscore. The first character must be a letter or underscore. Upper case and lower case letters are distinct. The number limit of characters is not consist, depend on system. (always 8 characters) Keywords like if, else, int, etc., can’t be used. It’s a good habit to choose the name related to the purpose of variable. Type Conversions Type Conversions 2.12 Precedence and order of evaluation 2.12 Precedence and order of evaluation 形式参数与实际参数 形式参数:定义函数时函数名后面括号中的变量名 实际参数:调用函数时函数名后面括号中的表达式 * Chapter 2: Types, Operators and Expressions Variable Names Data Types and Sizes Constants Declarations Arithmetic Operators Relational and Logical Operators Type Conversions Increment and Decrement Operators Bitwise Operators Assignment Operators and Expressions Conditional Expressions Precedence and Order of Evaluation 数据类型 基本类型 构造类型 指针类型 空类型 整型 字符型 实型(浮点型) 单精度型 双精度型 枚举类型 数组类型 结构体类型 共同体类型 Sum, day, M.D.richie, $45, int X,x,Y,y; student_name, student_number, k1,k2,k3 ==? m_eng, m_math,m_elec Rule1: “narrow” to “wide”. For example: float f; char c; f+c; /* value is double type*/ Explicit type conversions can be forced(coerced) in any expression (type-name) expression Example: char c; d=(double)c; Rule1: (type-name) expression (int)(x+y) ; (int)x+y; Left to right | Left to right ^ Left to right Left to right = = != = Left to right = = Left to right Left to right + - Left to right * / % Right Associability ! ~ + - * Left to right ( ) [ ] - . Associability Operators Right to left = += -+ *= /= %= = ^= |= = = Right to left ? : Left to right || Left to right Associativity Operators Chapter 3: Control Flow Statements and Blocks If-Else Else-If Switch Loops - While and For Loops - Do-While Break and Continue Goto and labels Chapter 4: Functions and Program Structure Basics of Functions Functions Returning
您可能关注的文档
- C程序设计_第三讲:程序设计方法-问题分析.ppt
- C程序设计_第五讲:程序设计方法(三)复杂数据结构设计.ppt
- C程序设计英文课件:CHAPTE 2 Types,Operators and Expressions.ppt
- C程序设计英文课件:CHAPTE 3 Control Flow.ppt
- C程序设计英文课件:CHAPTE 4 Functions and Program Structure.ppt
- C程序设计英文课件:CHAPTE 5 Pointer and Arrays.ppt
- C程序设计英文课件:CHAPTE 6 Structures.ppt
- C程序设计英文课件:CHAPTE 7 Input and Output.ppt
- C程序设计英文课件:第一章 A Tutorial Introduction.ppt
- 从计算机工程教育看知识、能力与工程方法浅谈.ppt
文档评论(0)