Categories
5. Disadvantages

No Garbage Collection

Garbage collection is a feature that automatically reclaims memory from objects no longer needed by an application or library. It can be used for both automatic and manual garbage collection. Automatic garbage collection occurs when there is insufficient free space on the heap to allocate new objects; this may occur because all available physical RAM was allocated to other processes running on the computer system. Manual garbage collection involves explicitly freeing unused blocks of memory with calls to functions such as malloc.

But in C/C++ languages, there’s no such feature of garbage collection as the culture of these languages is to leave storage management to the developer or programmer. Hence, it would be technically tedious and harsh on pockets to implement a precise garbage collector for C / C++.

Categories
5. Disadvantages

Low level of abstraction

C is a small and core machine language that has minimum data hiding and exclusive visibility that affects the security of this language.

Categories
5. Disadvantages

Constructor or destructor

C does not have any constructor or destructor.

Constructors & Destructors support basic functionality of Object Oriented Programming. Both are member functions that are created as soon as an object of the class is created. You will be studying constructor and destructor in detail later on.

Categories
5. Disadvantages

Lack of Exception Handling

Exception Handling is one of the most important features of programming languages. While compiling the code, various anomalies and bugs can occur. Exception Handling allows you to catch the error and take appropriate responses. However, C does not exhibit this important feature.

Categories
5. Disadvantages

Concept of namespace

C does not implement the concept of namespaces. A namespace is structured as a chain of commands to allow the reuse of names in different contexts. Without namespaces, we cannot declare two variables of the same name.

But, C programming lacks in this feature, and hence you cannot define a variable with the same name in C.

Categories
5. Disadvantages

Run-time checking

In the C programming language, the errors or the bugs aren’t detected after each line of code. Instead, the compiler shows all the errors after writing the program. It makes the checking of code very complex in large programs.

Categories
5. Disadvantages

Concept of OOPs

C is a very vast language, but it does not support the concept of OOPs (Inheritance, Polymorphism, Encapsulation, Abstraction, Data Hiding). C simply follows the procedural programming approach.