Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Computer Science (Part 2).doc
Скачиваний:
0
Добавлен:
01.05.2025
Размер:
359.42 Кб
Скачать

Variables and the Declaration Statement

A variable is a quantity that is referred to be name, such as a, b, c, d and average in the above program. A variable can take on many values during program execution, but you must make sure that they are given an initial value, as C does not do so automatically. However, before variables can be used in a program, they must be declared in a type declaration statement.

EXERCISE. Fill in the gaps to complete the sentences.

1.The Function ... must appear only once in a program. 2. /* CALCULATE AVERAGES*/ is a ... line. 3. The statement float a, b, c, d, average; is a ... statement. 4. The program below contains ... function statements. 5. The assignment statements are on lines ... and ... . 6. The main part of the program is enclosed within ... . 7. Each line of any C program must end with a ..., which acts as a statement ... . 8. If you forget to include the correct punctuation, the ... will produce a ... error. 9. A quantity referred to by name is known as a ... . 10. A ... statement must be used to declare variables.

Grammar revision

I. Translate the following sentences with the Subjective Infinitive Construction.

A. 1. They happened to meet her at the conference on computer security. 2. These data appeared to have been investigated long ago. 3. Magnetic fields are supposed to affect a high iron content of the ink. 4. The laser printer seems to be one of the best types of printers. 5. Electro photographic techniques proved to have developed from the paper copier technology. 6. The laser beam seems to have almost unlimited industrial possibilities. 7. Dot-matrix printers seem to have a lower quality of type. 8. These changes in the program appear to have been caused by a virus. 9. They proved to use an interactive whiteboard at the university. 10. The number of cyber attacks proves to have doubled this year.

B. 1. Printers are known to vary greatly in performance and design. 2. They are known to have obtained such valuable results. 3. They are expected to be the most commonly used devices. 4. He is said to have set up a home cinema. 5. The first pocket-size colour television sets were reported to have been developed. 6. A dot-matrix printer is known to use a group of pins to create precise dots. 7. Computers are proved to have taken a dominant role in our society. 8. My friend is said to be a computer addict. 9. The widespread availability of computers is reported to have in all probability changed the world for ever. 10. Networks of computers are known to be used to make information available on a world-wide scale.

C. 1. The most common printer type used on larger systems is sure to be the line printer. 2. A lot of techniques are certain to be used in the design of printers. 3. He is sure to be appointed IT consultant of the company. 4. Computer threats are certain to have become more complicated today. 5. The e-mail with this attachment is unlikely to be received tomorrow. 6. Computers are sure to be responsible for health problems. 7. The organization is likely to promote the use of computers in education. 8. Developers of this software are sure to add features that the customers need. 9. The report is certain to have been printed out. 10. When a person is spending so much time on the Internet that his life is affected negatively, he is sure to be suffering from Internet addiction.

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