天天看點

第1章-初識C語言

第1章-初識C語言

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.

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.

第1章-初識C語言

4. What does a compiler do?

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.

第1章-初識C語言