C Programming Absolute Beginner's Guide (3rd Edition)

(Romina) #1
FIGURE 1.3 Welcome to your programming home!

Note

The C program you write is called source code. A compiler translates C source code
into machine language. Computers are made up of nothing more than thousands of
electrical switches that are either on or off. Therefore, computers must ultimately be
given instructions in binary. The prefix bi- means “two,” and the two states of
electricity are called binary states. It’s much easier to use a C compiler to convert
your C programs into 1s and 0s that represent internal on and off switch settings than
for you to do it yourself.

The Programming Process


Most people follow these basic steps when writing a program:



  1. Decide exactly what the program should do.

  2. Use an editor to write and save your programming language instructions. An editor is a lot like a
    word processor (although not usually as fancy) that lets you create and edit text. All the popular
    C compilers include an integrated editor along with the programming language compiler. All C
    program filenames end in the .c file extension.

  3. Compile the program.

  4. Check for program errors. If any appear, fix them and go back to step 3.

  5. Execute the program.

Free download pdf