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的更多相关文章
随机推荐
- VS Code直接编辑下一行
ctrl + enter 可以直接跳转到下一行进行编辑,本行后面的字符不受影响. 这在书写html脚本时非常有用.
- html5/h5课件如何制作?
随着flash逐渐被html5取代,很多教育机构都在面临着如何将自己的flash交互课件产品转换到html5版本的问题,最近遇到非常多的客户一上来就问我,flash课件能直接转成Html5课件么?答案 ...
- C# .NET XML 序列化为对象,反序列化
如果遇到: 根级别上的数据无效. 行 1,位置 1 .:即无法反序列化(反序列失败),得到对象为null ,把 xml 文本 Trim一下. xml=xml.Trim(); 序列化完毕你可以看 ...
- Winform 窗体实现圆角展示
触发窗体的Resize事件,如下所示: #region 界面实现圆角 private void LoginForm_Resize(object sender, EventArgs e) { if (t ...
- python3-可变长度参数函数(*args 和 **kwargs)
简述: *args: 可变长度元组参数 **kwargs: 可变长度字典参数 ------------------------------------------------------- ...
- kafka reset offset 手工重置offset
1.场景 a)有时消费端逻辑修改,需要重复消费数据,需要将offset设置到指定位置. 2.实现 kafka版本:0.11.* KIP-122: Add Reset Consumer Group Of ...
- MD5加密出现 无法启动:此实现不是Windows平台FIPS验证的加密算法的一部分
出现问题: 出现这个问题的原因是订票助手.NET使用了MD5算法,而系统的组策略安全设置导致无法使用此算法.要修正此问题,请按照如下操作(两种方法任选其一). 注:(来源于 http://ask.f ...
- win10 solidity开发环境搭建
1. 软件安装 1) 安装nodejs 安装完成后将node.exe所在路径加入环境变量PATH中,以便在cmd命令行中直接使用node和npm命令 下面的操作在git bash下进行 2) 安装so ...
- SpringBoot与SpringCloud的版本对应详细版
大版本对应: Spring Boot Spring Cloud 1.2.x Angel版本 1.3.x Brixton版本 1.4.x stripes Camden版本 1.5.x Dalston版本 ...
- 廖雪峰Java9正则表达式-1正则表达式入门-2正则表达式匹配规则
正则表达式的匹配规则: 从左到右按规则匹配 匹配规则及示例 可以匹配 不能匹配 "abc" "abc" 不能匹配:"ab", "A ...