Sunday 5 January 2014

Advantages And Disadvantages Of C Language

                                Advantages

C Language has list of advantages due to this it is very much popular language around the world and best suitable for the programmer to learn at the fist stage of the programming. C is inherently easy to understand. Moreover, if you want to express some common ideas in programming, and in a way in which people are comfortable with, then using C is the best way you can accomplish this. 
    The most common advantages of C Language are;
 
  

1:  C Language is procedure oriented language, Here user creates procedures or functions to execute their task. Procedure oriented language is very much easy to learn because it follows algorithm to execute your statements. To develop program using procedure oriented language, you need to draw/prepare algorithm and then start converting it into procedure or functions.

2:  When you are working with C, you are working with various aspects like individual bits, pointers, and bytes. This will allow you toderstand the various optimization techniques for the computer system. 

3:  C Language provides lots of functions which consist of system generated functions and user defined functions. C Compiler comes with list of header files which consist of many general functions which can be used to develop program. while programmer can also create function as per their requirements that is called as user generated/defined function.

4:  It's always good to know, what is happening with regards to the components of the system that you are using. While working with higher level languages this is extremely useful, if something does not work or is slower than you thought it would be.

5:  C compiler produces machine code very fast as compared to other language compiler. C compiler can compile around 1000 lines of code in a seconds or two. One more benefit of the C Compiler is that it also optimize the code for faster execution.

6:  C Language syntax is very easy to understand. It uses keyword like if, else, goto, switch, goto, main, etc. This kind of keyword we all are using in our day to day life to convey meaning or to get some decisions. 

7:  C Language setup is around 4-6 MB. So you can carry this language in your Floppy Drive or Pen Drive. Its very easy to install and operate, Again its output is exe file which can be executed in any computer without any other framework / software.

8:  So even if there are other programmers who don't know C, you can still interact with them using the common tenets of C. 

                              Disadvantages 

 
Every coin has two sides, as C Language has also some disadvantages. C Language has not any major disadvantages but some features is missing in the C Language, obviously that's why C Language is very much powerful now. 

1. Object Oriented Programming Features is missing in C Language, You have to develop your program using procedure oriented language only.

2. In C Language there is no provision for run time type checking, for example i am passing float value while receiving parameter is of integer type then value will be changed, it will not give any kind of error message.

3. C does not provides namespace features, so you can't able to use the same variable name again in one scope. If namespace features is available then you can able to reuse the same variable name.

4. C does not provides object oriented features, so it don't have Constructor and Destructor features. Constructor and Destructor is used to construct object and destroy object. So in C Language you have to implement manually construction and destruction of the variable using function or by other means.

5. The disadvantages of C fall neatly from the advantages. The biggest one is that you can write C programs which can fail in very catastrophic ways. These programs will appear totally valid as far as the compiler is concerned but will not work and may even cause your computer to stop. A more picky language would probably notice that you were doing something stupid in your program and allow you to find the error before it crashed your computer! However a more picky language would probably not allow you to write the program in the first place!

6. Another disadvantage of C is that it allows you to write very terse code. You can express exactly what you want to do in very few statements. You might think that this is nice, because it makes your programs even more efficient, but it has the side effect of making them much harder to understand. At the time you write the code you know exactly what each part is supposed to do. If you come back to the program in several months you will need time to "get back inside it". If the code is written very tightly you will take much longer to do this, and other people may not be able to understand it at all! I write code which is not the most efficient possible, but is easy to understand. I am sacrificing program performance for ease of maintenance.


No comments:

Post a Comment