Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
oxford-english_rich_text2.doc
Скачиваний:
3
Добавлен:
01.07.2025
Размер:
8.5 Mб
Скачать

1 Instruction, instruct, instructed, instructor

a Our maths arithmetic.

b We were

c Both

explained to us the principles of binary

to document our programs very carefully.

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

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.

4

44

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

#tt#M#M111

EIM

Listen this terview with David Wendt, an expert on C. Are the following

sentences true (T) or false (F)?

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

C was based directly on a language called BCPL.

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 efficient 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.

T

45

ask 10 Listen 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 3 constructs required for well-structured programs: decision-making, loops, and

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, I'm not saying that. But if you need to write programs

that are 6 , fast in execution, and yet 7 from one

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

Reading

Task 11 Read the program below and the text on the next page, then complete the

sentences which follow.

/* CALCULATE AVERAGES */ main()

f

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;

printf("The average is %f", average);

1

C

46

omment 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 */ (at the end of the comment).

The Function main{ }

Every C program must have a function called main which must appear

5 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.

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