Студопедия — CHARACTERISTICS OF C PROGRAMMING LANGUAGE
Студопедия Главная Случайная страница Обратная связь

Разделы: Автомобили Астрономия Биология География Дом и сад Другие языки Другое Информатика История Культура Литература Логика Математика Медицина Металлургия Механика Образование Охрана труда Педагогика Политика Право Психология Религия Риторика Социология Спорт Строительство Технология Туризм Физика Философия Финансы Химия Черчение Экология Экономика Электроника

CHARACTERISTICS OF C PROGRAMMING LANGUAGE






Like most imperative languages in the ALGOL tradition, C has facilities for structured programming and allows lexical variable scope and recursion, while a static type system prevents many unintended operations. In C, all executable code is contained within subroutines, which are called "functions" (although not in the strict sense of functional programming). Function parameters are always passed by value. Pass-by-reference is simulated in C by explicitly passing pointer values. C program source text is free-format, using the semicolon as a statement terminator and curly braces for grouping blocks of statements.

The C language also exhibits the following more specific characteristics:

· There are a small, fixed number of keywords, including a full set of flow of control primitives: for, if, while, switch, and do..while. There is basically one namespace, and user-defined names are not distinguished from keywords by any kind of sigil.

· There are a large number of arithmetical and logical operators, such as +, +=, ++, &, ~, etc.

· More than one assignment may be performed in a single statement.

· Function return values can be ignored when not needed.

· Typing is static, but weakly enforced: all data has a type, but implicit conversions can be performed; for instance, characters can be used as integers.

· Declaration syntax mimics usage context. C has no "define" keyword; instead, a statement beginning with the name of a type is taken as a declaration.

· Heterogeneous aggregate data types (struct) allow related data elements to be accessed, for example assigned, as a unit.

· Array indexing is a secondary notion, defined in terms of pointer arithmetic. Unlike structs, arrays are not first-class objects; they cannot be assigned or compared using single built-in operators. There is no "array" keyword, in use or definition; instead, square brackets indicate arrays syntactically.

· Enumerated types are possible with the enum keyword. They are not tagged, and are freely interconvertible with integers.

· Strings are not a separate data type, but are conventionally implemented as null-terminated arrays of characters.

· Low-level access to computer memory is possible by converting machine addresses to typed pointers.

· Procedures (subroutines not returning values) are a special case of function, with a dummy return type void.

· Functions may not be defined within the lexical scope of other functions.

· Function and data pointers permit ad hoc run-time polymorphism.

· A preprocessor performs macro definition, source code file inclusion, and conditional compilation.

· Complex functionality such as I/O, string manipulation, and mathematical functions are consistently delegated to library routines.

(based on: http://en.wikipedia.org)

15. Find English equivalents in the text:

Засоби, область змінних, рекурсія, система статичної типізації даних, непередбачувані операції, підпрограми, передаватися за значенням, передача параметрів по посиланню, значення вказівника, крапка з комою, символ, що завершує твердження, фігурні дужки, ключові слова, базовий елемент, простір імен, знак (2), завдання, слабка типізація, ціле число, оголошення, гетерогенні сукупності типів даних (структури), масив індексів, взаємозамінний, рядки, зазвичай використовуються, порожній тип даних, спеціальний динамічний поліморфізм, макроозначення, включення файла з джерельним кодом, умовна компіляція, делегування математичних функцій бібліотекам

 

16. What words are defined? Choose them from the databank:

Databank: a primitive, a subroutine, a void, a declaration, a string, an operation, polymorphism, a statement, an array.

1) a set of instructions that performs a specific task for a main routine; 2) an action resulting from a single instruction; 3) an elementary instruction in a programming language; smth. stated; 4) a basic or fundamental unit of machine instruction or translation; 5) a programming language feature that allows values of different data types to be handled using a uniform interface; 6) a regular data structure in which individual elements may be located by reference to one or more integer index variables, syntactically indicated by square brackets; 7) a statement beginning with the name of a type; 8) null-terminated arrays of characters; 9) a dummy return type.

 

17. Make up word combinations:

1. to group a) pointer values
2. to exhibit b) to library routines
3. to mimic c) machine addresses
4. to assign d) examples
5. to convert e) lexical variable scope
6. to permit f) blocks of statements
7. to be delegated g) values
8. to allow h) usage context
9. to return i) ad hoc run-time polymorphism
10. to pass j) more specific characteristics

 







Дата добавления: 2015-09-06; просмотров: 620. Нарушение авторских прав; Мы поможем в написании вашей работы!



Шрифт зодчего Шрифт зодчего состоит из прописных (заглавных), строчных букв и цифр...

Картограммы и картодиаграммы Картограммы и картодиаграммы применяются для изображения географической характеристики изучаемых явлений...

Практические расчеты на срез и смятие При изучении темы обратите внимание на основные расчетные предпосылки и условности расчета...

Функция спроса населения на данный товар Функция спроса населения на данный товар: Qd=7-Р. Функция предложения: Qs= -5+2Р,где...

Гидравлический расчёт трубопроводов Пример 3.4. Вентиляционная труба d=0,1м (100 мм) имеет длину l=100 м. Определить давление, которое должен развивать вентилятор, если расход воздуха, подаваемый по трубе, . Давление на выходе . Местных сопротивлений по пути не имеется. Температура...

Огоньки» в основной период В основной период смены могут проводиться три вида «огоньков»: «огонек-анализ», тематический «огонек» и «конфликтный» огонек...

Упражнение Джеффа. Это список вопросов или утверждений, отвечая на которые участник может раскрыть свой внутренний мир перед другими участниками и узнать о других участниках больше...

ОПРЕДЕЛЕНИЕ ЦЕНТРА ТЯЖЕСТИ ПЛОСКОЙ ФИГУРЫ Сила, с которой тело притягивается к Земле, называется силой тяжести...

СПИД: морально-этические проблемы Среди тысяч заболеваний совершенно особое, даже исключительное, место занимает ВИЧ-инфекция...

Понятие массовых мероприятий, их виды Под массовыми мероприятиями следует понимать совокупность действий или явлений социальной жизни с участием большого количества граждан...

Studopedia.info - Студопедия - 2014-2024 год . (0.009 сек.) русская версия | украинская версия