您好,欢迎光临本网站![请登录][注册会员]  
文件名称: C-REFERENCE
  所属分类: C
  开发工具:
  文件大小: 513kb
  下载次数: 0
  上传时间: 2013-08-05
  提 供 者: u0113*****
 详细说明: About This Manual . . . . . . . . . . . . . . . . . . . . xix Related Publications . . . . . . . . . . . . . . . . . . . . . . xix Obtaining Publications . . . . . . . . . . . . . . . . . . . . . . xx Conventions . . . . . . . . . . . . . . . . . . . . . . . . . xxi Reader Comments . . . . . . . . . . . . . . . . . . . . . . . xxi 1. An Overview of ANSI C . . . . . . . . . . . . . . . . . . 1 ANSI C . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Strictly Conforming Programs . . . . . . . . . . . . . . . . . . . 1 Name Spa ces . . . . . . . . . . . . . . . . . . . . . . . . 1 Compiling ANSI Programs . . . . . . . . . . . . . . . . . . . 2 Guidelines for Using ANSI C . . . . . . . . . . . . . . . . . . . 2 Compiling Traditional C Programs . . . . . . . . . . . . . . . . . 3 Helpful Programming Hints . . . . . . . . . . . . . . . . . . . . 3 Recommended Practices . . . . . . . . . . . . . . . . . . . . 3 Practices to Avoid . . . . . . . . . . . . . . . . . . . . . . 4 2. C Language Changes . . . . . . . . . . . . . . . . . . . 7 Preprocessor Changes . . . . . . . . . . . . . . . . . . . . . . 7 Replacement of Macro Arguments in Strings . . . . . . . . . . . . . . 8 Token Concatenation . . . . . . . . . . . . . . . . . . . . . 9 Changes in Disambiguating Identifiers . . . . . . . . . . . . . . . . 10 Scoping Differences . . . . . . . . . . . . . . . . . . . . . . 10 Name Space Changes . . . . . . . . . . . . . . . . . . . . . 12 Changes in the Linkage of Identifiers . . . . . . . . . . . . . . . . 12 007–0701–150 vii Contents Types and Type Compatibility . . . . . . . . . . . . . . . . . . . 14 Type Promotion in Arithmetic Expressions . . . . . . . . . . . . . . . 14 Type Promotion and Floating Point Constants . . . . . . . . . . . . . . 15 Compatible Types . . . . . . . . . . . . . . . . . . . . . . 17 Argument Type Promotions . . . . . . . . . . . . . . . . . . . 17 Mixed Use of Functions . . . . . . . . . . . . . . . . . . . . 18 Function Prototypes . . . . . . . . . . . . . . . . . . . . . . 18 External Name Changes . . . . . . . . . . . . . . . . . . . . . 20 Changes in Function Names . . . . . . . . . . . . . . . . . . . 20 Changes in Linker-Defined Names . . . . . . . . . . . . . . . . . 20 Data Area Name Changes . . . . . . . . . . . . . . . . . . . . 21 Standard Headers . . . . . . . . . . . . . . . . . . . . . . . 22 3. Lexical Conventions . . . . . . . . . . . . . . . . . . . 23 Comments . . . . . . . . . . . . . . . . . . . . . . . . . 23 Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Integer Constants . . . . . . . . . . . . . . . . . . . . . . 24 Character Constants . . . . . . . . . . . . . . . . . . . . . . 25 Special Characters . . . . . . . . . . . . . . . . . . . . . . 25 Trigraph Sequences (ANSI C Only) . . . . . . . . . . . . . . . . 26 Floating Constants . . . . . . . . . . . . . . . . . . . . . . 27 Enumeration Constants . . . . . . . . . . . . . . . . . . . . . 28 String Literals . . . . . . . . . . . . . . . . . . . . . . . . 28 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Punctuators . . . . . . . . . . . . . . . . . . . . . . . . . 29 4. Meaning of Identifiers . . . . . . . . . . . . . . . . . . 31 viii 007–0701–150 C Language Reference Manual Disambiguating Names . . . . . . . . . . . . . . . . . . . . . 31 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Block Scope . . . . . . . . . . . . . . . . . . . . . . . 32 Function Scope . . . . . . . . . . . . . . . . . . . . . . 32 Function Prototype Scope . . . . . . . . . . . . . . . . . . . 32 File Scope . . . . . . . . . . . . . . . . . . . . . . . . 32 Name Spaces . . . . . . . . . . . . . . . . . . . . . . . . 33 Name Space Discrepancies Between Traditional and ANSI C . . . . . . . . 33 Linkage of Identifiers . . . . . . . . . . . . . . . . . . . . . 34 Linkage Discrepancies Between Traditional and ANSI C . . . . . . . . . . 36 Storage Duration . . . . . . . . . . . . . . . . . . . . . . . 37 Object Types . . . . . . . . . . . . . . . . . . . . . . . . . 38 Character Types . . . . . . . . . . . . . . . . . . . . . . . 38 Integer and Floating Point Types . . . . . . . . . . . . . . . . . . 38 Derived Types . . . . . . . . . . . . . . . . . . . . . . . 40 void Type . . . . . . . . . . . . . . . . . . . . . . . . 40 Objects and lvalues . . . . . . . . . . . . . . . . . . . . . . . 41 5. Operator Conversions . . . . . . . . . . . . . . . . . . . 43 Conversions of Characters and Integers . . . . . . . . . . . . . . . . 43 Conversions of Float and Double . . . . . . . . . . . . . . . . . . 43 Conversion of Floating and Integral Types . . . . . . . . . . . . . . . . 44 Conversion of Pointers and Integers . . . . . . . . . . . . . . . . . 44 Conversion of unsigned Integers . . . . . . . . . . . . . . . . . . 44 Arithmetic Conversions . . . . . . . . . . . . . . . . . . . . . 45 Integral Promotions . . . . . . . . . . . . . . . . . . . . . . 45 Usual Arithmetic Conversions . . . . . . . . . . . . . . . . . . 45 007–0701–150 ix Contents Traditional C Conversion Rules . . . . . . . . . . . . . . . . . 46 ANSI C Conversion Rules . . . . . . . . . . . . . . . . . . . 46 Conversion of Other Operands . . . . . . . . . . . . . . . . . . . 47 Conversion of lvalues and Function Designators . . . . . . . . . . . . . 47 Conversion of void Objects . . . . . . . . . . . . . . . . . . . 47 Conversion of Pointers . . . . . . . . . . . . . . . . . . . . . 48 6. Expressions and Operators . . . . . . . . . . . . . . . . . 49 Precedence and Associativity Rules in C . . . . . . . . . . . . . . . . 49 Primary Expressions . . . . . . . . . . . . . . . . . . . . . . 51 Postfix Expressions . . . . . . . . . . . . . . . . . . . . . . . 51 Subscripts . . . . . . . . . . . . . . . . . . . . . . . . . 52 Function Calls . . . . . . . . . . . . . . . . . . . . . . . 52 Structure and Union References . . . . . . . . . . . . . . . . . . 54 Indirect Structure and Union References . . . . . . . . . . . . . . . 54 postfix ++ and postfix - - . . . . . . . . . . . . . . . . . . 54 Unary Operators . . . . . . . . . . . . . . . . . . . . . . . 55 Address-of and Indirection Operators . . . . . . . . . . . . . . . . 55 Unary + and - Operators . . . . . . . . . . . . . . . . . . . . 56 Unary ! and ~ Operators . . . . . . . . . . . . . . . . . . . . 56 Prefix ++ and - - Operators . . . . . . . . . . . . . . . . . . . 56 sizeof Unary Operator . . . . . . . . . . . . . . . . . . . . 57 Cast Operators . . . . . . . . . . . . . . . . . . . . . . . . 57 Multiplicative Operators . . . . . . . . . . . . . . . . . . . . . 58 Additive Operators . . . . . . . . . . . . . . . . . . . . . . . 59 Shift Operators . . . . . . . . . . . . . . . . . . . . . . . . 60 Relational Operators . . . . . . . . . . . . . . . . . . . . . . 60 Equality Operators . . . . . . . . . . . . . . . . . . . . . . . 61 x 007–0701–150 C Language Reference Manual Bitwise AND Operator . . . . . . . . . . . . . . . . . . . . . . 62 Bitwise Exclusive OR Operator . . . . . . . . . . . . . . . . . . . 62 Bitwise Inclusive OR Operator . . . . . . . . . . . . . . . . . . . 63 Logical AND Operator . . . . . . . . . . . . . . . . . . . . . . 63 Logical OR Operator . . . . . . . . . . . . . . . . . . . . . . 63 Conditional Operator . . . . . . . . . . . . . . . . . . . . . . 64 Assignment Operators . . . . . . . . . . . . . . . . . . . . . . 65 Assignment Using = (Simple Assignment) . . . . . . . . . . . . . . . 65 Compound Assignment . . . . . . . . . . . . . . . . . . . . 66 Comma Operator . . . . . . . . . . . . . . . . . . . . . . . 66 Constant Expressions . . . . . . . . . . . . . . . . . . . . . . 66 Integer and Floating Point Exceptions . . . . . . . . . . . . . . . . . 67 7. Declarations . . . . . . . . . . . . . . . . . . . . . . 69 Storage Class Specifiers . . . . . . . . . . . . . . . . . . . . . 70 Type Specifiers . . . . . . . . . . . . . . . . . . . . . . . . 71 Structure and Union Declarations . . . . . . . . . . . . . . . . . . 72 Bitfields . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Enumeration Declarations . . . . . . . . . . . . . . . . . . . . . 76 Type Qualifiers . . . . . . . . . . . . . . . . . . . . . . . . 77 Declarators . . . . . . . . . . . . . . . . . . . . . . . . . 78 Meaning of Declarators . . . . . . . . . . . . . . . . . . . . . 78 Pointer Declarators . . . . . . . . . . . . . . . . . . . . . . 79 Qualifiers and Pointers . . . . . . . . . . . . . . . . . . . . 79 Pointer-related Command Options . . . . . . . . . . . . . . . . 80 Array Declarators . . . . . . . . . . . . . . . . . . . . . . 81 Function Declarators and Prototypes . . . . . . . . . . . . . . . . 82 Prototyped Functions Summarized . . . . . . . . . . . . . . . . 84 007–0701–150 xi Contents Restrictions on Declarators . . . . . . . . . . . . . . . . . . . . 85 Type Names . . . . . . . . . . . . . . . . . . . . . . . . . 86 Implicit Declarations . . . . . . . . . . . . . . . . . . . . . . 87 typedef . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . 88 Initialization of Aggregates . . . . . . . . . . . . . . . . . . . 89 Examples of Initialization . . . . . . . . . . . . . . . . . . . . 90 8. Statements . . . . . . . . . . . . . . . . . . . . . . . 93 Expression Statement . . . . . . . . . . . . . . . . . . . . . . 93 Compound Statement or Block . . . . . . . . . . . . . . . . . . . 93 Selection Statements . . . . . . . . . . . . . . . . . . . . . . 94 if Statement . . . . . . . . . . . . . . . . . . . . . . . . 94 switch Statement . . . . . . . . . . . . . . . . . . . . . . 95 Iteration Statements . . . . . . . . . . . . . . . . . . . . . . 95 while Statement . . . . . . . . . . . . . . . . . . . . . . 96 do Statement . . . . . . . . . . . . . . . . . . . . . . . . 96 for Statement . . . . . . . . . . . . . . . . . . . . . . . 96 Jump Statements . . . . . . . . . . . . . . . . . . . . . . . 97 goto Statement . . . . . . . . . . . . . . . . . . . . . . . 97 continue Statement . . . . . . . . . . . . . . . . . . . . . 97 break Statement . . . . . . . . . . . . . . . . . . . . . . 98 return Statement . . . . . . . . . . . . . . . . . . . . . . 98 Labeled Statements . . . . . . . . . . . . . . . . . . . . . . . 98 9. External Definitions . . . . . . . . . . . . . . . . . . . 101 External Function Definitions . . . . . . . . . . . . . . . . . . . . 101 External Object Definitions . . . . . . . . . . . . . . . . . . . . 102 10. Multiprocessing Directives . . . . . . . . . . . . . . . . 103 ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: C REFERENCE Manual 手册
 输入关键字,在本站1000多万海量源码库中尽情搜索: