Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Oxford for Computing_1993.doc
Скачиваний:
2
Добавлен:
01.07.2025
Размер:
6 Мб
Скачать
☆

Vocabulary

payroll (1. 62) - list of employees and the amount of money to be paid to each of them

41

X

Task 3

T ask 4

1 2 3 4 5 6

These are answers to questions about the text. Write the questions.

No, it is quite wordy so it is used for commercial purposes.

To support the UNIX operating system.

An applications program.

It is done by the compiler.

It fetches required systems routines and links them to the object module.

No. they are also sold by other vendors.

Summarize the information on different high-level computer languages by completing the table below.

Language

Developed

Function

Characteristic

FORTRAN

1959

mathematical and scientific purposes

•

combines features o^ COBOL and ALGOL

BASIC

to support Unix operating system

1962

Task 5

Find the passages in the text where the following ideas are expressed. Give the line references.

line

1

1

2

1

3

I.

4

1

5

1

Systems programs control the work of the computer system. Software packages are not always sold by the manufacturer.

Usually, every high-level instruction translates into many more in machine code.

Systems programs are usually provided by the manufacturer. Programmers may be required to write software for their employers.

42

Task 6 Using the line reference given, look back in the text and find the reference for

the words in italics.

  1. if they are given the right (line 1)

  2. it cannot be directly processed (line 5)

  3. it is called an applications program (line 38)

  4. commission their own programmers (line 40)

  5. to write them to meet (line 40)

  6. that would understand (line 48)

  7. which controls the central (line 51)

  8. links them to the object (line 54)

9 They are a set of programs (line 60) 10 which can be purchased (line 66)

T ask 7 Using the line references given, refer back to the text and find words or phrases

that have a similar meaning to:

  1. converted (lines 5-10)

  2. give the responsibility to (lines 3 5-^-40)

  3. brings (lines 50-5 5)

  4. are compatible with (lines 60-65)

  5. matches (lines 6 5-6 7)

T ask 8 Choose the correct word to complete each sentence. You may have to change

some words slightly.

1 instruction, instruct, instructed, instructor

a Our maths explained to us the principles of binary

arithmetic.

b We were to document our programs very carefully.

c Both and data have to be changed to machine code before

the computer can operate on them.

2 compilation, compiler, compile, compiled

a Our university computer does not have a PASCAL

b Usually, a programmer his program before he puts in the

data. c A source program cannot be directly processed by the computer until it has

been

5

S

3 result, results, resulting

a The linkage editor links systems routines to the object module. The

program, referred to as the load module, is directly

executable by the computer. b The of these mathematical operations were obtained from

the university mainframe,and not from my micro.

43

specification, specify, specific, specified, specifically

a Our company bought three packages with very — applications:

payroll, accounts receivable, and accounts payable. b An applications program is designed to do a type of work,

such as calculating the stress factor of a roof. c Did the analyst give the new programmer the necessary to

start on the project?

C language

Listening

Task 9 (Si Listen to this interview with David Wendt, an expert on C. Are the following

sentences true (T) or false (F)?

1 LJ C was written to support the development of the MS/DOS operating system.

2

□

3

□

4

□

5

□

6

□

7

D

8

□

9

□

10

□

C was based directly on a language called BCTL

UNIX was rewritten in C in 1973.

C is rarely used for systems programming now.

C's main disadvantage is that it has a small set of operators.

C is more powerful than Assembler.

C can be used to access memory addresses directly.

Pascal and C produce equally fast and ellicient code.

C is the ideal language for everyone.

A language called D is expected to replace C.

Listen again. Change the sentences that are false to make them true.

44

Task 10

IJstcn again to the cassette and fill in the gaps in the tapescript below.

interviewer: Could you give some examples of how it does that?

David wendt: Yes. With C, the programmer can access the underlying hardware. He can access memory addresses directly, he can perform

operations on values stored as , and he can store variables in

registers, just as in Assembler. This produces faster and more _

code than is produced by high-level languages like PASCAL. At the same time,

it provides the fundamental t - constructs required

for well-structured programs: decision-making, loops. k\m\ 1

These features combined together provide a very powerful tool for the programmer.

interviewer: You make it sound like the ideal language for everyone.

david wendt: Well, no, Ifm not saying that. But if you need to write programs

that are _ , fast in execution, and yet ' from one

computer to another, then C is the language you should be using.

Task 11

Reading

Read the program below and the text on the next page, then complete the sentences which follow.

i

/* CALCULATE AVERAGES */ mainO

float a,b,c,d,average;

printf("Enter three numbers:");

scanf("%f %f %f",&a,&b,&c);

d=a+b+c;

average=d/3.0;

printfC'The average i s %f", average,);

45

Comment Lines

A C source program consists of statements and comment lines. Comment lines are enclosed by the characters /* (at the start of the comment) and 7 (at the end of the comment).

The Function main{ }

Every C program must have a function called main which must appear s only once in a program. The parentheses following the word main must be present, but there must be no parameters included. The main part of the program is enclosed within braces {}, and consists of declaration statements, assignment statements, and other C functions. In the above program there are six statements within the braces: a declaration

10 statement (the first statement of the main program starting with the word float), two assignment statements (the fourth and fifth statements starting with the variable names d and average), and three function statements, two to print information on the screen and one to scan the keyboard for input.

15 As C is a free form language, the semicolon (;) at the end of each line is a must. It acts as a statement terminator, telling the compiler where an instruction ends. Free form means that statements can be identified and blank lines inserted in the source file to improve readability, and statements can span several lines. However, each statement must be

20 terminated with a semicolon. If you forget to include the semicolon, the compiler will produce an error, indicating the next line as the source of the error. This can cause some confusion, as the statement objected to can be correct, yet as a syntax error is produced.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]