chapter3---C语言(谭浩强版)英文.pptVIP

  • 7
  • 0
  • 约1.05万字
  • 约 50页
  • 2017-12-26 发布于河北
  • 举报
chapter3---C语言(谭浩强版)英文

Chapter iii Types, Operators and Expressions By:wangxia e-mail:wangxia1026@163.com Review: void main() { int max (int x, int y); int a,b,c; scanf(%d,%d,a,b); c=max(a,b); print9max=%d\n,c); } int max(intx,inty); { int z; if(xy) z=x; ekse z=y; return(z); } contents 3.0 grammar of c 3.1 data types of c 3.2 variables and constants 3.3 data type---integer 3.4 data type—float 3.5 data type—char 3.6 set initial values 3.7 compound operations 3.8 Arithmetic Operators and arithmetic expressions 3.9 assignment Operators and assignment expressions 3.10 comma Operators and comma expressions exercises 3.0 grammar of c -- character set to be classified to 4 kinds: (1) english letters:52 (2) figures:10 (3) underline: _  (4) special symbols: consists of 1~2 symbols such as: + ,=, 3.0 grammar of c -- identifier which is used to identify the variable name、constant name、function name etc. such as: correct:_1 student_name sum0 wrong :M.D.Jones $123 #a 3b ?c a=b 3.0 grammar of c -- identifier ATTENTION: Uppercase is different with lowercase. SUM is different with sum 2. Can not be same as Reserved Words. int float include not… 3.0 grammar of c – reserved words Special identifiers: 32 (1)which relate to data types (14): char int float double signed unsigned short long void struct union typedef enum sizeof 3.0 grammar of c – reserved words (2) which relate to storage (4) auto extern register static (3) which relate to program control structure (12) do while for if else switch case default goto continue break return 3.1 Data types of C What are chief contents of this chap? ----data structures ----operators and expressions Why should we study these? 3.1 Data types of C —a example An ex

文档评论(0)

1亿VIP精品文档

相关文档