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. 【申嵌视频】基于VMWare虚拟机下安装ubuntu操作系统的详细步骤

    [申嵌视频]基于VMWare虚拟机下安装ubuntu操作系统 适合搭建mini2440, Tiny6410, smart210,Tiny4412, NanoPC-T2, NanoPC-T3, Nano ...

  2. linux Table is marked as crashed and should be repaired

    linux Table is marked as crashed and should be repaired 2014-07-28 10:34 1282人阅读 评论(0) 收藏 举报  分类: da ...

  3. windows使用ruby配置redis集群

    基本是从网上抄的.不过网上的东西不一定是完全正确的 我修正了一下 首先,资源有限,我就不搞什么主机从机了,我需要的集群实现内存的最大化 四台机器安装redis, 配置成服务, 打开6379端口,集群1 ...

  4. 【C++】如何接收函数return返回来的数组元素

    转自 https://www.cnblogs.com/Wade-James/p/7965775.html 我们知道return语句作为被调用函数的结束,返回给调用者函数值.一般来说,是返回一个函数值, ...

  5. 使用Visual Studio Code开发(编译、调试)C++程序

    总体安装步骤 安装VSC(Visual Studio Code). 安装C/C++编译器(如MinGW-w64),然后配置好环境变量.//完成这步即可在VSC的终端(命令行)下编译.运行.cpp程序了 ...

  6. vscode setting

    { "files.autoSave": "onFocusChange", "window.openFilesInNewWindow": tr ...

  7. WAMP中mysql服务突然无法启动 解决方法

    wamp的mysql服务前两天还能用,今天突然不能无法启动了,原因可能是近期电脑强行关机,删除wamp\bin\mysql\mysql5.6.17\data目录下的ib_logfile0和ib_log ...

  8. 1、Netty 实战入门详解

    一.Netty 简介 Netty 是基于 Java NIO 的异步事件驱动的网络应用框架,使用 Netty 可以快速开发网络应用,Netty 提供了高层次的抽象来简化 TCP 和 UDP 服务器的编程 ...

  9. svg在vue-cli3中的配置

    svg矢量图有时候在项目中用起来当然要比图片用起来好.之前没有用过svg,这次花了一点时间在项目中支持了svg的使用,个人感觉用起来还是没有直接用font class的爽,然后又改成font clas ...

  10. python-web自动化-鼠标操作

    鼠标操作由ActionChains类来完成鼠标操作 perform() 执行鼠标操作move_to_element() 鼠标悬浮:最常用的操作double_click() 双击操作context_cl ...