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列的列标号为零。

1_translation_1的更多相关文章

随机推荐

  1. error: Cannot find OpenSSL's <evp.h> Mac

    问题 mac安装php需要openssl ./configure –with-openssl 报错 error: Cannot find OpenSSL’s 解决 brew install opens ...

  2. 使用OwnCloud搭建自己的云盘

    使用OwnCloud搭建自己的云盘 1.用途 ownCloud是一款开源的私有云框架,可以通过它实现个人网盘的功能,ownCloud提供了各个平台的文件同步客户端,因此搭建好ownCloud之后即可使 ...

  3. OpenCV中feature2D——BFMatcher和FlannBasedMatcher

    作者:holybin 原文:https://blog.csdn.net/holybin/article/details/40926315 Brute Force匹配和FLANN匹配是opencv二维特 ...

  4. ignoreDependencyType(Class class)方法使用

    该方法字面意思是忽略依赖类,注释给出的解释是在自动装配时忽略指定类型的依赖注入. 经过我在网上查的资料,发现自动装配有两种方式: 一种是在xml配置文件中的<beans>标签中配置一个属性 ...

  5. MTSC2018 | 确认过眼神,在这里能遇见Google、阿里、百度......

    MTSC2018部分Topic曝光啦 Google,阿里,百度,美团,小米,360,网易等公司是如何将技术转化为现实生产力,提高工作效率的?离开Saucelab的Jonathan又是如何规划Appiu ...

  6. ubuntu16.04 HyperLedger Fabric 1.2.0 开发环境搭建

    安装准备 1. 安装git.cRUL.gcc/g++和make $ sudo apt-get update $ sudo apt-get install build-essential git cur ...

  7. linux 安装中文支持

    下载  fonts-chinese-3.02-12.el5.noarch.rpm fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm 安装各种提示的依赖 安装 chkf ...

  8. 无法启动此程序,因为计算机中丢失VCRUNTIME140.dll 尝试重新安装此程序以解决此问题

    最近在阿里云上租了个服务器,想借此发布一些自己制作的网页.于是就打算安装一下环境,考虑到搭建动态网站所要安装的环境比较多,于是就选择了wampserver这样一个集成环境的安装. 由于我的服务器很新( ...

  9. js实现输入某串数字,构建完全二叉树,并判断是否为二叉搜索树

    思路:若为二叉搜索树,则中序遍历为递增的 let arr = [15,8,16,6,10];let pindex = [];function Node(){ this.root = null; thi ...

  10. DevExpress 折线图和柱状图的绘制与数据绑定

    DevExpress 组件是一个非常丰富和强大的组件,适合各种可视化图形的绘制与展示,在数据分析展示中是个很有帮助的,网上也有很多关于这方面的文章,关于折线图或柱状图的画法,以下是自己在工作中接触到的 ...