Classroom Presentation Suggestions
Before the class, go through the slides and remove any “Compiling the program using ....” slides that do
not pertain to your local setting.
If you are using a commerical compiler (Borland, Microsoft), check the slides to make sure that
informatioin them is still current.
Starting with the slide on Construction Tools (Slide 9) you may want to demonstrate the creation of an
actual program. Show how to edit, compile, get an error, edit again, compile, and run a program.
After this lecture, the class should adjourn to the computer lab where they will type in their first program
under the watchful eye of the instructor. This is the time they will need the most hand-holding as they
will make a large number of simple errors trying to get the compiler to run.
Review Questions
1. Define “Machine Language.”
A language consisting of a series of numbers. These numbers represent the actual
instructions used by the computer. Easy for computers to understand, but very difficult
for humans.
2. Define “Assembly Language.”
A language in which a single instruction translates directly into a single machine
instruction.
3. Define “source code.”
The high level code written by the programmer. In a high-level language, the source code
is usually machine independent.
4. Define “object code.”
The source code after it has been translated into machine language.
5. Define “library.”
A collection of generally useful procedures available to the programmer
6. Define “linker.”
A program that combines one or more object files with a set of libraries and produces an
executable program.
7. Define “executable program.”
A machine dependent file that contains all the instructions necessary to perform a task.
8. How is assembly language different from machine language?
Machine language is solely numbers. Assembly language uses words to represent those
numbers.
Page 5
9. What does a compiler do?
It takes a source file and transforms it into an object file. Note: many “compilers” are
actually wrappers that run a compiler and a linker.
10. How is a compiler different from an assembler?
One assembly instruction translates to one machine language instruction. Assembly
language is a low-level language. A compiler translates one statement into many
instructions.
Compilers are also machine-independent, while assemblers are machine-dependent.
11. What is the extension for source files on our machine?
Practical C++ Programming by manish baranwal
Start from the beginning
