Discussion Outline- Week 7
- General Questions
- Questions on Project 2
- Questions on Midterm - General Questions only !!!
DO NOT GIVE ANSWERS FOR ANY OF THE MASTER QUESTIONS !!!
- Tracing Code
- Example with variables of the same name in main
and in the functions
- Top-Down Design OR Stepwise Refinement
- Separate Compilation
- The 3 typical files - discuss the theory of it
- The foo.h file contains prototypes, constants and can be used as
the interface for users
- The foo.c file that contains the function definitions, usually supplied
to users in object code form (not source code form)
- The foobar.c file that contains main, an application that uses the
functions in foo.c
- Discuss the mechanics of separate compilation
- Both foo.c and foobar.c need foo.h #included
- Need to compile foo.c with the -c option to produce the .o file
- cc201 foobar.c foo.o