It is always difficult to start describing a programming language because little details do not make much sense until one knows enough to understand the "big picture." In this chapter,I try to give you a glimpse of the big picture by looking at a sample program and explaining its working line by line.This sample program also shows you how familiar procedures are accomplished in C. This information plus the other topics discussed in the chapter introdure you to the basics of the C language so that you can begin writing useful programs.

  The program we dissect reads text from the standard input, modifies it, and writes it to the standard output. Program l.l first reads a list of column numbers. These numbers are pairs and indicate ranges of columns in the input line. The list is terminated with a negative number. The remaining input lines are read and printed, then the selected columns from the input lines are extracted and primed. Note that the first column in a line is number zero. 

--spring from "Pointers on C" 1.1 Introduction.

  从头开始介绍一门编程语言总是显得很困难,因为有许多细节还没有介绍,很难让读者在头脑中形成一幅完整的画。在本章中,我将向大家展示一个例子程序,并逐渐讲解它的工作过程,试图让大家对C语言的整体有一个大概的印象。这个例子程序同时向你展示了你所熟悉的而过程在C语言中是如何实现的。这些信息再加上本章所讨论的其他主题,向你介绍了C语言的基础知识,这样你就可以自己编写有用的C程序了。

  我们所要分析的这个程序从标准输入读取文本并对其进行修改,然后把它写到标准输出。程序1.1首先读取一串列标号。这些列标号成对出现,表示输入行的列范围。这串列标号以一个负值结尾,作为结束标志。剩余的输入行被程序读入并打印,然后输入行中被选中范围的字符串被提取出来并打印。注意,每行第1列的列标号为零。