- What are the disadvantages of C programming language.
- What do you mean by high level, middle level and low level languages and give an example for each.
- Why C is a Middle level programming language.
What are the disadvantages of C Programming Language
- C Programming Language doesn't support Object Oriented Programming(OOP) features like Inheritance, Encapsulation, Polymorphism etc. It is a procedure oriented language. In C, we have to implement any algorithms as a set of function calls.
- C doesn't perform Run Time Type Checking. It only does compile time type checking. At run time, C doesn't ensure whether correct data type is used instead it perform automatic type conversion.
- C does not provides support for namespace like C++. Without Namespace, we cannot declare two variables of same name.
- C doesn't support the concept of constructors and destructors.
What do you mean by high level, middle level and low level languages and give an example for each.
Low Level : Low-level programming language is a programming language that provides little or no abstraction from a computer's instruction set architecture. It is described as described as being "close to the hardware". Machine code is low level because it runs directly on the processor.
- Low level memory management
- No abstraction from the hardware.
- Direct access to CPU Registers.
- Instructions written in binary
- Fast Execution
Middle Level : These languages are intermediate of low level and high level language. They supports the feature of both high level and low level language. They provide support for low level memory manipulation as well as high level abstractions such as objects.
Example : C, C++
High Level : High level Programming languages are more closer to Humans than computer. It provides lots of Abstractions and wrappers over low level implementation details and hardware access. It provides lots of inbuilt libraries and modules which acts as building blocks of programs. Programs in high level languages are easy to write but execution is slow in comparison with low level languages.
Example : Ruby
Why C is a Middle level programming language.
C is often called a middle level programming language because it supports the feature of both high level and low level language. C being a mid level language doesn't mean that, it is less powerful or harder to use than any high level language.
C combines the best elements of high level language with the control and flexibility of low-level language(assembly language).
Like assembly language, C provide support for manipulation of bits, bytes and memory pointers at the same time it provides abstraction over hardware access.