English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

The C programming language is considered to be a low to middle level language; in other words, while you can program using the usual kind of stuff: functions, types, and so-on, C also makes it easier to program using assembly language (also called 'bit twiddling'). OS developers often use C because of this. They can program many facets of an OS much faster with C, but they can still get close to the metal to program the more delicate sequences.

Assembly language and the aspects of C allowing the same function are use for things like disk formatting, code optimization, drivers, and things like that. Other more high leveled languages make this more difficult. An example is the C++ programming language, which while being object oriented and based directly on C, makes it more difficult to program close to the metal.

2006-11-07 18:42:49 · answer #1 · answered by Roasted Kiwi 4 · 3 0

One consequence of C's wide acceptance and efficiency is that the compilers, libraries, and interpreters of other higher-level languages are often implemented in C.

C is used as an intermediate language by some higher-level languages. This is implemented in one of two ways, as languages which:

Emit C source code, and one or more other representations: machine code, object code, and/or bytecodes. Examples: some Lisp dialects (Lush), Squeak's C-subset Slang.
Emit C source code only, and no other representation. Examples: Eiffel, Sather; Esterel.
C source code is then input to a C compiler, which then emits finished machine or object code. This is done to gain portability (C compilers exist for nearly all platforms) and to avoid having to develop machine-specific code generators.

Unfortunately, C was designed as a programming language, not as a compiler target language, and is thus less than ideal for use as an intermediate language. This has led to development of C-based intermediate languages such as C

2006-11-08 03:23:57 · answer #2 · answered by safrodin 3 · 2 0

fedest.com, questions and answers