1_translation_1
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的更多相关文章
随机推荐
- ArcEngine 调用GP里面的Merge工具
这两天,为ArcEngine中的Merge工具的调试伤头脑筋,明明很简单的事情,就是搞不掂儿.今天忽然想到是否是中文的关系,果然,把中文修改成英文成功了.真是快郁闷死了! public static ...
- fragment滑动界面
1.代码页面 package com.example.fragment_list_copy; import android.app.FragmentManager;import android.sup ...
- 去freessl.org申请免费ssl服务器证书
去freessl.org申请免费ssl服务器证书 来源: 本文链接 来自osnosn的博客 写于: 2019-03-30. 想搞个自签名证书,可以参考这篇: 用openssl为WEB服务器生成证书(自 ...
- 2018-2019-2 20175311 实验二 《Java开发环境的熟悉》实验报告
2018-2019-2 20175303 实验二 <Java开发环境的熟悉>实验报告 一.实验准备 1.了解掌握实验所要用到的三种代码 伪代码 产品代码 测试代码 2.IDEA中配置单元测 ...
- note10 元组
元组 Tuple +元组即不可变(immutable)列表 除了可改变列表内容的方法外,其他方法均适用于元组 因此,索引.切片.len().print等均可用 但是,appeng.extend.del ...
- note 8 字符串
字符串String 一个字符的序列 使用成对的单引号或双引号括起来 或者三引号""" 和 ''' 表示块注释 字符串运算 长度 len()函数 first_name = ...
- 你真的理解了for循环吗?反正我是没有
for循环的执行步骤 咱们先来看一个有意思的关于for循环的程序 public class TestFor { public static void main(String[] args) { int ...
- html_学习地址
源码地址: 玩安卓:https://www.wanandroid.com/project: 博客/博主地址:
- C#和.Net的关系
1..net(dot net) .net是一个平台,抽象的平台概念. 实现形式是库:①定义了基本的类型(通用类型系统CTS,common type system). ②包含.net公共语言运行库( ...
- SQL多表操作
1.多表之间的建表原则 一对多:商品和分类 建表原则:在多的一方添加一个外键,指向一的一方的主键 多对多:老师和学生,学生和课程 建表原则:建立一张中间表,将多对多的关系,拆分成一对多的关系,中间表至 ...