C PROGRAM DEVELOPEMNT C程序的开发阶段 Phases of C Program Development(4/4) Edit Editor Prog.cD Execute(运行) Loader puts program in memory. Preprocess CPU takes each Compiler Prog. obj instruction and Compile executes it, possibly Libraries storing new data values as the program executes Link Linker Prog.exe Load Loader CPU Execute RAM 第一讲〔语言报疹计入门 目录
C程序的开发阶段 Phases of C Program Development (4/4) C Program DeVeLoPemnT 第一讲 C语言程序设计入门 目 录 Edit Preprocess Compile Link Load Execute Editor Prog.c Compiler Linker Loader CPU Prog.obj Prog.exe RAM Libraries Execute(运行) – Loader puts program in memory. – CPU takes each instruction and executes it, possibly storing new data values as the program executes
C PROGRAM DEVELOPEMNT c程序的开发工具 Program Development tools Edit Editor Prog.c Preprocess Compiler Prog. obj Compile Libraries Link Linker Prog.exe Integrated Devel lopment Environment(IDE)(集成 Load 开发环境 IDE Turbo c/c++ Execute Borland c/c++ Visual c/c++ 第一讲〔语言报疹计入门柔
C程序的开发工具 C Program Development Tools C Program DeVeLoPemnT 第一讲 C语言程序设计入门 目 录 Edit Preprocess Compile Link Load Execute Editor Prog.c Compiler Linker Prog.obj Prog.exe Libraries Integrated Development Environment (IDE)(集成 开发环境) – Turbo C/C++ – Borland C/C++ – Visual C/C++ IDE
PROGRAM DESIGN IN C LANGUAGE 第二讲数据类型、运算符和表达式 Data Types, Operators and Expressions 2.1字符集标识符关键字 Character Set, Identifiers and Keywords 2.2变量 2.7字巷型教据 Variables Characters 2.3数据类型 2.8字符串常量 Data I ypes String Constants 24常量 2.9术运算符 Constants Arithmetic Operators 2.5蓬型数据 2.10类型转换 Integers Type Conversion 2.6浮点型教据 211赋值运算持 Floating-point Data Assignment Operators 2.12逗号算符 Comma Operator 目录
第二讲 数据类型、运算符和表达式 Data Types,Operators and Expressions Program Design in C Language 目 录 2.2 变量 Variables 2.3 数据类型 Data Types 2.4 常量 Constants 2.5 整型数据 Integers 2.1 字符集 标识符 关键字 Character Set, Identifiers and Keywords 2.7 字符型数据 Characters 2.8 字符串常量 String Constants 2.9 算术运算符 Arithmetic Operators 2.10 类型转换 Type Conversion 2.6 浮点型数据 Floating-point Data 2.11 赋值运算符 Assignment Operators 2.12 逗号运算符 Comma Operator
CHARACTER SET IDENTIFIERS AND KEYWORDS 字符集 Character set 口C语言源程序文件是来自一个字符集的字符序列。 A C source file is a sequence of characters selected from a character set 口C语言的字符集( character set) 52个大小写字母( Letters) A B C D E G且 U S宁vWYz abcdefghijklmnopqrstuvwxyz 10个数字(Dgts) 0123456789 空格( SPACE) 制表符(Tab) 图形符号( Graphic characters) !#号^&*(_)-+=~[]|\;:"t},.<>/? 第二讲擲粪型、算莓和表达丸「
字符集 Character Set C 语言源程序文件是来自一个字符集的字符序列。 A C source file is a sequence of characters selected from a character set. C 语言的字符集(character set) – 52个大小写字母(Letters) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z – 10个数字(Digits) 0 1 2 3 4 5 6 7 8 9 – 空格(SPACE) – 制表符(Tab) – 图形符号(Graphic characters) ! # % ^ & * ( _ ) - + = ~ [ ] ' | \ ; : " {} , . < > / ? CHaraCTer seT, iDenTiFiers anD KeYWorDs 第二讲 数据类型、运算符和表达式 目 录
CHARACTER SET IDENTIFIERS AND KEYWORDS 标识符 I Identifiers 口标识符( Identifiers) 是一个字符序列,包括大小写字母( capital and small letters),数字 ( digits)和下划线( the underscore character)。 用来标识变量名、符号常量名、数组名、函数名、结构名、类型名等 命名规则 首字符必须是字母或下划线; 一般内部标识符的前31个字符有效,而外部标识符的前6个字符有效; 不能与关键字相同。 12x OK Invalid n1 n2 sum Ihere money$ display matrix vold maIn Integer 七ime date-time 第二讲擲粪型、算莓和表达丸「
标识符 Identifiers 标识符(Identifiers) – 是一个字符序列,包括大小写字母(capital and small letters),数字 (digits)和下划线(the underscore character)。 – 用来标识变量名、符号常量名、数组名、函数名、结构名、类型名等。 命名规则 • 首字符必须是字母或下划线; • 一般内部标识符的前31个字符有效,而外部标识符的前6个字符有效; • 不能与关键字相同。 CHaraCTer seT, iDenTiFiers anD KeYWorDs 第二讲 数据类型、运算符和表达式 目 录 i j k n1 n2 sum display_matrix _time 1 2x !here money$ void main integer date-time OK Invalid