Clanguage - C OSMIC Soft ware C Language manual Rev 1.4 Copyright COSMIC Software 1999 2008 All rights reserved Table of Contents Preface Chapter 1

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Copyright © COSMIC Software 1999, 2008 All rights reserved. OSMIC Software C C Language manual Rev. 1.4
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Table of Contents ( i ) Preface Chapter 1 Historical Introduction Chapter 2 C Language Overview C Files. ........................................................................................ 5 Lines . .................................................................................... 5 Comments. ............................................................................ 6 Trigraphs. .............................................................................. 6 Lexical Tokens. ........................................................................... 7 Identifiers. ............................................................................. 7 Keywords. ............................................................................. 7 Constants . ............................................................................. 8 Operators and Punctuators. ................................................... 8 Declarations . ............................................................................... 9 Integer Types. ....................................................................... 9 Bit Type. ............................................................................. 11 Real Types. ......................................................................... 11 Pointers. .............................................................................. 12 Arrays . ................................................................................ 13 Structures. ........................................................................... 13 Unions. ................................................................................ 13 Enumerations. ..................................................................... 14 Functions . ........................................................................... 14 Chapter 3 Declarations Integers. ..................................................................................... 16 Reals. ......................................................................................... 16 Bits. ........................................................................................... 17 Pointers . .................................................................................... 17 Arrays. ....................................................................................... 18 Modifiers. .................................................................................. 19 Structures . ................................................................................. 22 Unions. ...................................................................................... 24 Enumerations . ........................................................................... 24 Functions. .................................................................................. 25 Storage Class. ............................................................................ 27
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
( ii ) Typedef. .................................................................................... 29 Variable Scope. ......................................................................... 30 Absolute Addressing. ................................................................ 30 Chapter 4 Expressions Variables. .................................................................................. 32 Constants . ................................................................................. 32 Strings. ...................................................................................... 35 Sizeof. ....................................................................................... 37 Operators . ................................................................................. 37 Arithmetic operators. .......................................................... 38 Bitwise operators. ............................................................... 39 Boolean operators. .............................................................. 40 Assignment operators. ........................................................ 41 Addressing operators. ......................................................... 43 Function call operator. ........................................................ 44 Conditional operator. .......................................................... 46 Sequence operator . ............................................................. 47 Conversion operator . .......................................................... 47 Priorities. ................................................................................... 49 Chapter 5 Statements Block statement . ....................................................................... 54 Expression statement . ............................................................... 54 If statement . .............................................................................. 55 While statement . ....................................................................... 57 Do statement. ............................................................................ 58 For statement . ........................................................................... 59 Break statement . ....................................................................... 61 Continue statement . .................................................................. 62 Switch statement. ...................................................................... 63 Goto statement. ......................................................................... 65 Return statement. ...................................................................... 66 Chapter 6 Preprocessor Macro Directives . ..................................................................... 70 Hazardous Behaviours. ....................................................... 73 Predefined Symbols. ........................................................... 75 Conditional Directives. ............................................................. 77
Background image of page 4
( iii ) Control Directives. .................................................................... 79 #include . ............................................................................. 79 #error . ................................................................................. 79 #line . ................................................................................... 79 #pragma . ............................................................................. 80
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
© Copyright 2008 by COSMIC Software 1 Preface Chapter 1, Historical Introduction Chapter 2, C Language Overview - file structure, separate compile - character set (trigraph, logical lines, preprocessor) - naming, identifiers, keywords, operators, punctuation - C objects (simple, aggregate) - functions Chapter 3, Declarations - syntax for each kind of object - modifiers const, volatile - extra modifiers for pointers - function declaration, arguments and local variables - classes and scope - type redeclaration (typedef) Chapter 4, Expressions - identifiers, operators and constants - operators behaviour - conversions, explicit, implicit Chapter 5, Statements - description of each statement Chapter 6, Preprocessor - description of each directives - traps and solutions - pragmas and their usage
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
© Copyright 2008 by COSMIC Software CHAPTER 3 1 Historical Introduction The C language was designed in 1972 at the Bell Lab’s by Denis Ritchie, mainly to rewrite the UNIX operating system in a portable way. UNIX was written originally in assembler and had to be completely rewritten for each new machine. The C language was based on previous languages named B and BCPL, and is logically called C to denote the evolution. The language is described in the well known book “ The C Program- ming Language ” published in 1978, whose “ Appendix A ” has been used for many years as the de facto standard. Because of the growing popu- larity (The popularity) of UNIX and of the C language (growing), sev- eral companies started to provide C compilers outside of the UNIX world, and for a wide range of processors, microprocessors, and even micro-controllers.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/01/2010 for the course CS CS1212 taught by Professor Dr.cc during the Spring '10 term at University of Arkansas – Fort Smith.

Page1 / 94

Clanguage - C OSMIC Soft ware C Language manual Rev 1.4 Copyright COSMIC Software 1999 2008 All rights reserved Table of Contents Preface Chapter 1

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online