Tuesday, November 30, 2010

1.1 Hello World

  • C program consist of functions & variables
  • Functions contain statements that specify the computing operations
  • Variables stores value used during the computation
  • Program begins executing at the beginning of "main" function 
  • Arguments are data values of functions (surrounded by parentheses)
  • On method of communicating data between functions is for the calling function to provide a list of values, called arguments, to the function it calls

Monday, November 29, 2010

Introduction

  • C is a general-purpose computer programming language for use with the Unix operating system
  • B is "typeless" language; C provides a variety of data types
  • Fundamental data types are integer, character & floating point
  • Hierarchy of derived data types created with pointers, arrays, structures and unions
  • C provides the fundamental control-flow constructions required for well-structured programs: 
    • statement grouping
    • decision making (if-else)
    • selecting one of a set of possible cases (switch)
    • looping with termination test at the top (while, for)
    • looping with termination test at the bottom (do)
    • early loop exit (break)