C Primer Plus Fifth Edition 笔记chapter1

C Primer Plus Fifth Edition 笔记chapter1

Summary:

C is a powerful, concise programming language. It is popular because it offers useful programming tools and good control over hardware and because C programs are easier than most to transport from one system to another.

C is a compiled language. C compilers and linkers are programs that convert C language source code into executable code.

Programming in C can be taxing, difficult, and frustrating, but it can also be intriguing, exciting, and satisfying. We hope you find it as enjoyable and fascinating as we do.

 

Review Questions:

1.    What does portability mean in the context of programming?

我的答案:程序的移植性就是说程序可以经过少量的改动或者不用修改就可以在不同的平台上运行。

标准答案:A perfectly portable program is one whose source code can, without modification, be compiled to a successful program on a variety of different computer systems.

 

2. Explain the difference between a source code file, object code file, and executable file.

我的答案:source code file就是源代码文件,也就是用户自己编写的那部分程序代码文件。Object code file目标代码文件就是使用编译器对源代码文件进行编译得到的代码文件。Executable file可执行文件就是通过连接器对目标代码以及库文件,启动代码形成的可以直接运行的文件。

标准答案:A source code file contains code as written in whatever language the programmer is using. An object code file contains machine language code; it need not be the code for a complete program. An executable file contains the complete code, in machine language, constituting an executable program.

 

3. What are the seven major steps in programming?

我的答案:计划,构思程序流程图,编写代码,编译代码,生成可执行文件运行,调试,维护和升级

标准答案:

a.    Defining program objectives.

b.    Designing the program.

c.    Coding the program.

d.    Compiling the program.

e.    Running the program.

f.    Testing and debugging the program.

g.    Maintaining and modifying the program.

 

4. What does a compiler do?

我的答案:编译器就是编译源代码文件,生成目标代码文件,还有debug的作用,即能调试源代码。

标准答案:A compiler translates source code (for example, code written in C) to the equivalent machine language code, also termed object code.

 

5. What does a linker do?

我的答案:连接器就是连接目标代码文件,库文件及启动代码形成可执行文件

标准答案:The linker combines translated source code with library code and start-up code to produce an executable program.

  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值