Datasheet
16
Part I: Getting to the Starting Line
Figure 1-3:
How pro-
gramming
works.
Compiler
CPU
Memory
Disk
1
Idea
int main(int argc, char*argv[]) {
char* theSandwich = “I hate peanut butter and jelly”;
printf (theSandwich);
return 0;
}
2
3
4 5
6
6
66
I hate peanut butter
and jelly
In the same way, you do need to know a little bit about how computers work
to have what you do to write a computer program make sense.
When you run a computer program, the computer does its primary work in
a part of the machine you cannot see, the CPU, which executes the program
instructions that are loaded into the computer’s memory. (This is a fast,
temporary form of storage that is in one of those chips you see when you
05_522752-ch01.indd 1605_522752-ch01.indd 16 8/27/09 9:45:03 PM8/27/09 9:45:03 PM