Chapter 1

What Is a Program?

In This Chapter

arrow Understanding programs

arrow Writing your first “program”

arrow Looking at computer languages

In this chapter, you get a handle on what a program is and what it means to write a program. You get to practice on a Human Computer and see some program snippets written for a real computer. Finally, you get a look at your first code snippet written in C++.

Up until now, all of the programs running on your computer were written by someone else. Very soon now, that won’t be true anymore. You’ll be joining the ranks of the few, the proud: the programmers.

How Does My Son Differ from a Computer?

A computer is an amazingly fast but incredibly stupid machine. A computer can do anything you tell it (within reason), but it does exactly what it’s told — nothing more and nothing less.

In this respect, a computer is almost the exact opposite of a human: Humans respond intuitively. When I was learning a second language, I found that it wasn’t enough to understand what was being said — it’s just as important and considerably more difficult to understand what was left unsaid. This is information that the speaker shares with the listener through common experience or ...

Get Beginning Programming with C++ For Dummies, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.