Você está na página 1de 1

The most recent version is always maintained at its Stanford CS Education Librar y URL http://cslibrary.stanford.edu/101/.

Please send your comments to nick.parlante@cs.stanford.edu. I hope you can share and enjoy this document in the spirit of goodwill in which it is given away -- Nick Parlante, 4/2003, Stanford California. Stanford CS Education Library This is document #101, Essential C, in the Stanfor d CS Education Library. This and other educational materials are available for fre e at http://cslibrary.stanford.edu/. This article is free to be used, reproduced, exc erpted, retransmitted, or sold so long as this notice is clearly reproduced at its begin ning. Table of Contents Introduction ................................................................... ......................pg. 2 Where C came from, what is it like, what other resources might you look at. Section 1 Basic Types and Operators ..........................................pg . 3 Integer types, floating point types, assignment operator, comparison operators, arithmetic operators, truncation, promotion. Section 2 Control Structures ................................................... .....pg. 11 If statement, conditional operator, switch, while, for, do-while, break, continu e. Section 3 Complex Data Types ................................................... ..pg. 15 Structs, arrays, pointers, ampersand operator (&), NULL, C strings, typedef. Section 4 Functions ............................................................ ............pg. 24 Functions, void, value and reference parameters, const. Section 5 Odds and Ends ........................................................ ......pg. 29 Main(), the .h/.c file convention, pre-processor, assert. Section 6 Advanced Arrays and Pointers ....................................pg. 3 3 How arrays and pointers interact. The [ ] and + operators with pointers, base address/offset arithmetic, heap memory management, heap arrays. Section 7 Operators and Standard Library Reference ..............pg. 41 A summary reference of the most common operators and library functions. The C Language C is a professional programmer's language. It was designed to get in one's way a s little as possible. Kernighan and Ritchie wrote the original language definition in their book, The C Programming Language (below), as part of their research at AT&T. Unix and C++ emerged from the same labs. For several years I used AT&T as my long distance ca rrier in appreciation of all that CS research, but hearing "thank you for using AT&T" for the

Você também pode gostar