Why 'C' is Low-level Language? | Sololearn: Learn to code for FREE!

+2

Why 'C' is Low-level Language?

How can we say 'C' is closest to hardware. Yeah we can access memory and manipulate it easily.

10/17/2021 2:24:05 AM

Srikanth

24 Answers

New Answer

+22

C and C++ are both high level languages. There is no such thing as a middle level language. The amount of disinformation, rumour, and outright BS that gets posted on Sololearn by people who do not know what they are talking about is astounding. Most of the time it's just people repeating the same BS they were told and never questioned. Though sometimes it's just idiots making fools of themselves. "A high-level programming language is a programming language with strong abstraction from the details of the computer." https://en.m.wikipedia.org/wiki/High-level_programming_language Assembly language and machine code are low level languages. Just because a language offers memory management features does not make it a low level language. Similarly bitwise operations are available in most, if not all, high level languages. Bitwise operations do not make a language low level. A language that provides loops, functions, data structures, classes, and methods is providing abstraction from the underlying cpu. The very fact that ANSI C/C++ code is portable at the source code level means it is a high level language - it does not rely on the underlying cpu architecture or instruction set.

+12

I don't think 'C' is a low level language Although it might be at the lower end of high level languages spectrum, but it still possess enough level of abstraction to be considered as a high level language.

+8

The definition of the term high and low level languages has not changed over time. People are confusing language features and libraries with the definition of the terms high level and low level. It's people who do not understand those definitions spouting rubbish that has changed.

+5

sree harsha you do not understand what constitutes a low level language and we do not have to agree that direct memory access makes it a low level language. Using a pointer to access a location in memory is independent of the underlying processor architecture. A programmer writing such code does not have to concern themselves with the actual cpu instructions or registers involved in achieving it. Thus the code would be processor independent. Though such code is likely to be system dependant since randomly accessing memory is likely to cause unpredictable behaviour on different systems.

+4

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

+4

Thank You Indira SAN Rishi Kiwwi# Arsenic For Beginners For disclosing your point of view ๐Ÿ˜Š After all your points I come to know.. 'C' is Mid-Level language as it possesses the characteristics of Low-level and High-level Languages. Characteristics of Low-level Language: 1. Direct memory management 2. Hardware has extremely little abstraction 3. Much fast than high level 4. Superb performance but hard to write Characteristics of High-level Language: 1. These are Interpreted 2. Large community 3. Flexible syntax and easy to read I hope I'm on right page...๐Ÿ˜Š

+4

sree harsha If you consider a language low-level because it can be used for making system softwares, then here you go Java is low-level: JX OS is written in Java C++ is low-level: Symbian OS was written in C++ Rust is low-level: RedoxOS is written in Rust Python is low-level: PyPy interpreter was written in Python In fact, the compiler/interpreter (which are system softwares) for most languages is developed using the language itself, so in that sense almost every language is low-level. Assembly is a low-level language. Here is a code with inline assembly I made a few months back that displays a pattern https://code.sololearn.com/cUR2m4TG4Dox/?ref=app Here is a C code that does the same thing I made in under a minute https://code.sololearn.com/ciZatGqMTIPa/?ref=app See the difference?

+2

Srikanth Actually C is a middle level language... Because it serves both the aspects (low level language as well as high level language).. 1) It provide a vehicle for the programmer to specify action to be executed .(close to the machine) 2)It provide a set of concepts for the programmer to use when thinking about what can be done..(close to the problem to be solved)

+2

Srikanth if a language is pre-compiled or interpreted isn't related with if it is a low or high level; it is more a design consequence. There doesn't exist a mid level, it is more an underground term to describe a mix or transition between them. The hard part of low-level is design the system, not write the code.

+2

The definition of low level has changed quite a bit since the inception of computer science. I would not qualify C as a low or high level language, but rather more like an intermediary language. The only true low level programming is machine code or assembly (asm). Assembly is as close as possible to what the CPU (the computer's processor) can execute, as it is literally a text translation of the binary code which the CPU understands. For example, compression libraries are typically built in C, and very specific parts would be built using assembly, but the amount of assembly is getting lesser because compilers are getting so much better at optimization. I consider C a low-level language nowadays. Certainly, it is the primary language that Holberton uses in the low-level curriculum. So for me C is low level because when using it we have to manage our own application memory, it is not managed for us by the language. This requires us as engineers to take total responsibility for our actions. This means our mistakes will tend to be catastrophic but the rewards are substantial in terms of efficiency and power consumption on whatever device runs our code. Also, being a C programmer can be inherently satisfying if you like to understand the technical details of your work.

+2

C and C++ both are high level languages....

+1

C could be considered the assembler made language. If is high or low level, it is relative to the criteria

+1

Kiwwi# I agree with your statement but from my observation, 'C' is neither Low-level nor High-level. So I thought 'C' is in between Low and High i.e., Middle-Level๐Ÿ˜Š If I'm driving in wrong direction please add some strong points to change my direction ๐Ÿ˜”

+1

The problem is that the term changed along the time, thats why told you it is relative to the criteria. When it was released decades ago it was high level compared with assembler and other langs. But nowadays it is low-level, as much more higher level langs are around these days.

+1

Kiwwi# Yeah I got your point ๐Ÿค—

+1

Thank you Martin Taylor ๐Ÿ˜

+1

Arsenic Are you having any proof that C is not a low level programming Any valid reason kindly let me know I need to know that

+1

Because the compiling of the C is faster than the High-level languages. The sintaxes is different too. The low language has sintax that is more undrestandable for computer, but less than for people. This is the different

+1

sree harsha I don't see C having any low level language feature maybe except inline assembly. I am interested to know how you define a high/low level language.

0

Using C(and C++ ofcourse), you can access even the most smallest memory unit(a bit) from your computer memory. That is, using a C code, you can know if a bit is on or off in any memory location. Isn't that amazing? And C(and C++) provides lot of permission and access to the programmer. "Trust the programmer" is followed in these languages. So as a result, using these languages you can interact to the hardwares of your computer with the closest way possible. That's why C is called low-level and closest-to-hardware language. C++ is just an upgraded version of C. So every feature(almost) in C is also in C++