Disadvantages of using C

Disadvantages of using C
Techiio-author
Written by Sagar RabidasNovember 24, 2021
6 min read
C
0 VIEWS 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWS SHARE
Techiio-author
Sagar Rabidas

Software Developer

In my 1st blog on C, we will discuss the Advantages of C. Today we discuss the disadvantages of using C.

About C

C programming is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. C is the most widely used computer language. It keeps fluctuating at the number one scale of popularity along with the Java programming language, which is also equally popular and most widely used among modern software programmers.

blogpost

The disadvantages of the C language

  • Lack of Object Orientation

C is a very vast and powerful language and simply follows the procedural programming approach. It doesn't extend its support to the concept of OOPs (Inheritance, Polymorphism, Encapsulation, Abstraction, Data Hiding). Here, you can't create a class with multiple inheritances like Java, Python, or C++. In OOP languages like Java, we can inherit methods from the parent class. But there is nothing similar in the C language. We cannot create subclasses for our classes. So it makes it difficult to reuse existing codes.

  • Inefficient Memory Management

In C Language you don't need any memory management techniques because it automatically manages all allocated resources for you. But if you want to use dynamic allocation then you should allocate dynamically by malloc function. If you do this manually then you will get a segmentation fault error. So we must always remember about Memory Management Techniques.

  • 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++.

  • Run-time checking

In the C programming language, the errors are not detected after each line of code. The compiler shows all the errors in the code only during the run-time of the whole which makes the checking of code (debugging) exceptionally complex in enormous projects.

Also, the compiler doesn't check whether a variable was declared before its use. The programmer must remember this rule while writing programs.

  • The concept of a namespace is not present in C

C doesn't carry out the idea of namespaces. A namespace is organized as a chain of commands to permit the reuse of names in various settings. Without namespaces, we can't pronounce two factors of a similar name.

However, C programming is devoid of this feature, and consequently, you can't characterize a variable with the same name in C.

  • Absence of Exception Handling

Special case Handling is perhaps the main element of programming dialects. While compiling the code, different errors and bugs can happen. Exception Handling permits you to identify the bugs and rectify them. Be that as it may, C doesn't show this significant feature.

  • Lacks Constructor and Destructor

C doesn't have any object-oriented functionalities, and hence, it doesn't have Constructor and Destructor features. So in C Language, you need to carry out the manual construction and/or destruction of the variable, either by utilizing a function or by different means.

c
c++
java
python
0 VIEWS 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWS SHARE
Was this blog helpful?
techiio-price-plantechiio-price-plantechiio-price-plantechiio-price-plantechiio-price-plan
You must be Logged in to comment
Code Block
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance