prova e pare

Page 1

C Programming/Print version From Wikibooks, the open­content textbooks collection

Table of Contents C Programming/Print version...............................................................................................................1 From Wikibooks, the open­content textbooks collection............................................................1 Introduction................................................................................................................................6 Why Learn C?.................................................................................................................................6 History of the C Programming Language.......................................................................................7 Getting Started................................................................................................................................7 Dev­C++.....................................................................................................................................9 gcc..............................................................................................................................................9 Introductory Exercises...................................................................................................................11 Beginning C.............................................................................................................................12 Basic Concepts..............................................................................................................................12 Compilation: How Does C Work?................................................................................................12 Integrated Development Environments (IDEs).............................................................................13 Block Structure, Statements, Scope, and Whitespace...................................................................13 Basics of Using Functions.............................................................................................................14 The Standard Library....................................................................................................................14 Comments and Coding Style.........................................................................................................14 The Preprocessor...........................................................................................................................15 Footnotes.......................................................................................................................................15 Preprocessor..................................................................................................................................15 Syntax Checking...........................................................................................................................16 Object Code...................................................................................................................................16 Linking..........................................................................................................................................16 C Structure and Style.....................................................................................................................16 Introduction...................................................................................................................................16 Line Breaks and Indentation.........................................................................................................17 Line Breaks...............................................................................................................................17 Indentation................................................................................................................................18 Comments.....................................................................................................................................18 Single­line Comments..............................................................................................................19 Multi­line Comments...............................................................................................................19 Examples.......................................................................................................................................21 Links..............................................................................................................................................21 Handling divide by zero errors.....................................................................................................22 Variables.......................................................................................................................................22 Declaring, Initializing, and Assigning Variables..........................................................................23


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.