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. java安装与配置

    参考:https://blog.csdn.net/gaokao2011/article/details/75211429 Win 1.JDK JDK 可以到官网下载http://www.oracle. ...

  2. 猜测的rpc负载均衡原理,基于dubbo的架构

    集群层(Cluster):封装多个提供者的路由及负载均衡,并桥接注册中心,以Invoker为中心,扩展接口为Cluster.Directory.Router和LoadBalance.将多个服务提供方组 ...

  3. 和2018年年初做管理系统的不同(vuex)

    从2017年底开始做公司批改后台系统(服务内部人员对熊猫小课用户的作业进行批改.对批改员工资结算等)到教务系统(服务于内部人员对熊猫小课等移动端产品的内容进行配置等).ai-boss系统(服务于内部人 ...

  4. mac下常用命令

    常用命令 ls 查看当前目录下的文件 cd 进入某目录 . cd - 跳转回前一目录 . cd ~ 进入当前用户个人目录 pwd 输出当前所在路径 mkdir 新建文件夹. touch 新建文件 fi ...

  5. Retrofit 下载网络图片 保存到本地

    private void downImage(String imagePath) { try { CommonV2Api.downloadFile(mContext, imagePath, new I ...

  6. Python【每日一问】12

    问:请解释线程.进程.协程 答: [定义] 进程 进程:一个运行的程序(代码)就是一个进程,进程是系统资源分配的最小单位.进程拥有自己独立的内存空间,多个进程间资源不共享 线程 线程:调度执行的最小单 ...

  7. 2018-2019-2 20165312《网络攻防技术》Exp1 PC平台逆向破解

    2018-2019-2 20165312<网络攻防技术>Exp1 PC平台逆向破解 一.Exp1.1 直接修改程序机器指令,改变程序执行流程 知识要求:Call指令,EIP寄存器,指令跳转 ...

  8. oracle_hc.sql

    select event,count(1) from gv$session group by event order by 2;exec dbms_workload_repository.create ...

  9. VS2017 ASP.NET MVC 5.0 开部署问题汇总

    1[SqlException (0x80131904): 拒绝了对对象 '****' (数据库 '***',架构 'dbo')的 EXECUTE 权限.] “/”应用程序中的服务器错误. SQL 20 ...

  10. 获取物理内存total值和used值

    1.使用 free -m 查看 2.物理内存total值 # free -m | grep Mem | awk '{print $2}' 3.物理内存used值 # free -m | grep Me ...