Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How "low" does C go as a "low-level" language? [closed]

We often hear that C is a low-level language, but how low does it go? The lowest level I am aware of is memory management using pointers. Are there further levels I have yet to discover? What does "close to the hardware" mean? How "close to the hardware" is C?

like image 231
eric.christensen Avatar asked Feb 16 '11 18:02

eric.christensen


People also ask

Is C is a low-level language?

C and C++ are now considered low-level languages because they have no automatic memory management.

How does C work at a low level?

C is just a step up from assembly language, which is practically a human translation of machine code. It doesn't get any lower than machine code, but people don't read hexadecimal very well, so assembly is considered the lowest level programming language.

Is C the most low-level language?

C is by far the most low-level programming language of all general purpose, architecture-independent programming languages in existence. The only thing which is lower level than C is Assembly, which is not architecture-independent.

Which is the lowest level language?

A low-level language is a programming language that provides little or no abstraction of programming concepts and is very close to writing actual machine instructions. Two examples of low-level languages are assembly and machine code.


2 Answers

Use the standard terminology. Higher level languages and Lower level languages.

High level languages are designed for the ease of the person writing the language.

Lower level languages are designed for the ease of the computer running the language.

C is just a step up from assembly language, which is practically a human translation of machine code. It doesn't get any lower than machine code, but people don't read hexadecimal very well, so assembly is considered the lowest level programming language.

Most C operations can be translated into less than ten machine instructions. Some can be translated into a single machine instruction (depending on many circumstances). By comparison, many high-level languages might require dozens to thousands of machine instructions to implement a particular operation.

The "level" of a language is mostly an abstract concept. It is not useful for much except comparing one language to another in the context of trying to understand if you will have to write more source code in one or another, or if you will have to know more about the machine's architecture in one language as compared to another.

like image 89
Edwin Buck Avatar answered Sep 23 '22 08:09

Edwin Buck


C is sometimes referred to as "portable assembly language". Essentially anything that you can do in assembly, you can do in C (either through features built into the language or through inline assembly).

like image 29
bta Avatar answered Sep 20 '22 08:09

bta