September 1998
Intermediate to advanced
848 pages
20h 13m
English
Let's take a look at a simple C program. (Figure 2.1 outlines a more extensive example.) This program, shown in Listing 2.1, serves to point out some of the basic features of programming in C. Before you read the upcoming line-by-line explanation of the program, read through Listing 2.1 to see if you can figure out for yourself what it will do.
#include <stdio.h> int main (void) /* a simple program */ { int num; /* define a variable called num */ num = 1; /* assign a value to num */ printf("I am a simple "); /* use the printf() function */ printf("computer.\n"); ... |
Read now
Unlock full access