Students should read Chapter 1
Hardware Monitor, Keyboard, Mouse, CPU, Printer, Scanner
Software Programs/Applications
Input Device Keyboard, Microphone, Mouse, etc.
Output Device Printer, Speakers, Monitor, etc.
Secondary Storage Device Hard Drive, Floppy Disk, Zip
Disk, etc.
Bit Stores a Zero or a One (a binary digit)
Byte Contains 8 bits and can store one character.
Before a Program runs it is transferred from a secondary
storage device (the hard drive) to RAM (Random Access Memory). This memory will be erased
if the computer is shut-off.
ROM (Read Only Memory) Is used to
store the startup instructions for the computer. It cannot be written
to and is not erased when the power is shut off to the computer.
CPU (Central Processing Unit) does all logical and
mathematical calculations and runs the computer operations.
Operating System Controls how the hardware and user interact.
Address Where a memory location resides.
Compiler Transforms a high level language
to machine language.
Source Code/File The program which you create in a high level language such as C.
Syntax The rules of a high level
language.
Understanding how to solve a problem:
Ref pg 21 The
Software Development Method
Using Pseudo-code
IN CLASS INSTRUCTION ON
(see Day 2 for more notes):
Understanding the C
Elements
Using the Compiler
Checking for Errors and
Correcting Errors
Running a Program
***************************************************************************
Lets look at a C program and try to decipher the different commands and
syntax used.
#include <stdio.h> /* this is the standard input/output library */
/*using the include statement above is like
copying or typing the library functions used in your program into your program
*/
void main( ) /* define a function named main */
{
/* call the function printf to
print sequence of characters.
The call to this function is made from main
*/
printf(hello, world\n);
}
A typical C program has preprocessor instructions 1st
then the main function and any other functions following main. Each function is made up
of statements that may be any of the following:
a declaration, assignment, function, control or null.