Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Тексты 1-2 курс(ИВТ,ПИ).doc
Скачиваний:
10
Добавлен:
01.04.2015
Размер:
302.08 Кб
Скачать

Text 23 c language

C programming language singles out minimalism. The authors of the language like to program on it easily compiled with the help of one-pass compiler to each elementary component of the program after compiling corresponded to a very small number of machine instructions, and the use of the basic elements of the language is not activated the runtime library. Single-pass compiler compiles the program, not coming back, to the already processed by the text. Therefore, the use of functions and variables must be preceded by their announcement. Code in C it is easy to write on a low level of abstraction, almost like in assembly language. Sometimes C called "universal assembler" or "high-level assembler", which reflects the difference between the languages of the assembly language for the different platforms, and the unity of the standard C code which can be compiled without changes on virtually any model of the computer. C is often called the language of the middle level or even low level, given how close it works to real devices. However, in a strict classification, it is a higher level language.

Compilers of C are developed relatively easy thanks to the simplicity of the language and the small size of the standard library. That is why this language is available on various platforms (it is possible, the range of these platforms are greater than that of any other existing language). Besides, in spite of its low-level nature, the language allows you to create portable programs and supports in this programmer. Standard language program can be compiled on different computers.

C (as well as UNIX, with which it has long been connected) was created by programmers for programmers, the range of which would be slightly wider range of developers of the language. Despite this, the area of use of the language is much broader tasks of the system programming.

C was created with one important purpose: to make more simple writing large programs with a minimum of errors according to the rules of a procedural programming, not adding the final code of the programs of extra overhead for the compiler, as it always make the languages of a high level, such as Basic. On this side of C have the following important features:

- simple language base from which placed in the library of the many significant opportunities, like mathematical functions or functions file management;

- orientation to procedural programming, provides the ease of use of the structural style of programming;

- type system, protects from the senseless operations;

- the use of the preprocessor to, for example, macro definitions and the inclusion of files with the source code;

- direct access to the computer's memory through the use of pointers;

- the minimum number of key words;

- transfer parameters to a function by value, not by reference (with the transfer of the link is emulated using pointers);

- pointers to functions and static variables

- action field names;

- structures and unions user - defined collecting data types, which can be manipulated as a unit.

Here are some of the features of other programming languages, which do not have a C:

- automatic memory management;

- support for object-oriented programming (when the first version of C++ generate the code of the program in the C language);

- short;

- nested function (there are compilers for the C language to implement this function, for example the GNU compiler);

- polymorphism of functions and operators;

- built-in support for multitasking and network

- higher order functions

- currying.

After the appearance of the C language was well received, because he could quickly create compilers for new platforms, as well as allow programmers fairly accurately represent, as obligations are being fulfilled their programme. Thanks to this program, written in C, and effective written in many other languages. As a rule, only optimized manually assembler code can work even faster, because it gives full control over the machine, however, the development of modern c compilers together with complication of modern processors narrowed the gap.

One of the consequences of high efficiency and portability of C is that many compilers, interpreters and libraries of other high-level languages are often implemented in the C language.