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

(Romina) #1

1. What Is C Programming, and Why Should I Care?


In This Chapter


  • Understanding the basics of C programming

  • Finding and installing a C compiler

  • Learning the steps of the programming process


Although some people consider C to be difficult to learn and use, you’ll soon see that they are wrong.
C is touted as being a cryptic programming language, and it can be—but a well-written C program is
just as easy to follow as a program written in any other programming language. The demand for
programmers and developers today is high, and learning C is an effective foundation to build the
skills needed in a variety of fields, including app development, game programming, and so much
more.


If you’ve never written a program in your life, this chapter is an excellent beginning because it
teaches you introductory programming concepts, explains what a program is, and provides a short
history of the C language. Get ready to be excited! C is a programming language rich in its
capabilities.


What Is a Program?


A computer isn’t smart. Believe it or not, on your worst days, you are still light-years ahead of your
computer in intelligence. You can think, and you can tell a computer what to do. Here is where the
computer shines: It will obey your instructions. Your computer will sit for days processing the data
you supply, without getting bored or wanting overtime pay.


The computer can’t decide what to do on its own. Computers can’t think for themselves, so
programmers (people who tell computers what to do) must give computers extremely detailed
instructions. Without instructions, a computer is useless; with incorrect instructions, a computer will
not successfully execute your desired task. A computer can no more process your payroll without
detailed instructions than an automobile can start by itself and drive around the block independently.
The collection of detailed expressions that you supply when you want your computer to perform a
specific task is known as a program.


Note

Word processors, apps, spreadsheets, and computer games are nothing more than
computer programs. Facebook is a collection of programs. Without such programs, the
computer would just sit there, not knowing what to do next. A word-processing
program contains a list of detailed instructions, written in a computer language such as
C, that tells your computer exactly how to be a word processor. When you program,
you are telling the computer to follow the instructions in the program you have
Free download pdf