Lecture #5 – Parts of your first program

Published on: Thu Feb 04 2010

Include Files - Pull what is necessary from included library’s and inserts into Binary Standard Libraries - Math and Standard Operations The Preprocessor (More on this in CSE 230) - Strips our Comments - Makes substitutions for named constants - insert definition of included function files (Reserves space for them) Every C Program must have a main function int main (void) Program Structure
  1. Preprocessor directives
    1. #include-d files
    2. Other definitions/Declarations
  2. Supporting functions
  3. Main functions
Variables are named blocks of memory Intergers Regular int = 4 bytes Short int = 2 bytes Floating Points Float = 4 bytes (standard accuracy, 8 digits after decimal) Double = 8 bytes (better accuracy, more decimals) Char – 1 byte Every memory block has a # and your var is assigned a # (by Preprocessor?)