July 2004
Beginner to intermediate
576 pages
12h 3m
English
IN THIS CHAPTER, YOU ARE INTRODUCED to the C language so that you can see what programming in C is all about. What better way to gain an appreciation for this language than by taking a look at an actual program written in C?
To begin with, you’ll choose a rather simple example—a program that displays the phrase “Programming is fun.” in your window. Program 3.1 shows a C program to accomplish this task.
Example 3.1. Writing Your First C Program
#include <stdio.h>
int main (void)
{
printf ("Programming is fun.\n");
return 0;
}In the C programming language, lowercase and uppercase letters are distinct. In addition, in C, it does not matter where on the line you begin typing—you can begin typing your ...