C Dis and Adv

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Tuesday, December 25, 2012

C Language Advantages and Disadvantages : C Language Features



: 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.

1. Procedure Oriented Language
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. Lots of Libraries
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.

3. Speed of Compilation
C compiler produces machine code very fast 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.

4. Easy to Learn (Syntax is near to English Language)
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.

5. Portable
C Language setup is around 3-5 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.


: C Language 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 (OOPS)
Object Oriented Programming Features is missing in C Language, You have to develop
your program using procedure oriented language only.

2. Run Time Type Checking is Not Available
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. Namespace Feature
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. Constructor and Destructor is not available:
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.

What are the advantages and disadvantages of c++?
Best Answer

It's fairly vague (advantages over what? disadvantages over what?), but I'll give it
a shot.

advantages:

1. vendor-neutral: the C++ standard is the same in any platform or compiler
2. industrial (as opposed to academic): evolved to satisfy the needs of software
engineers, not computer scientists
3. efficient. Compiles into highly optimized CPU-specific machine code with little
or no runtime overhead.
4. multi-paradigm: allows the use and penalty-free mixing of procedural, OOP,
generic programming, functional programming, etc
5. strictly statically typed (unlike Python for example): a large amount of logic
(and sometimes even calculations) can be proved and performed at compile time,
by the type checking/inferring system.
6. has deterministic memory management (as opposed to Java, C#, and other
languages with garbage collectors): the life time of every object is known with
absolute precision, which makes destructors useful and RAII possible.

disadvantages:

1. very complex! The learning curve is steep and takes a long time to climb,
especially for those who know C or C# or other superficially similar languages
2. has the concept of "undefined behavior" (just like C) -- a large class of errors
that neither compiler nor the runtime system is required to diagnose.
3. has some design flaws, although they are largely fixed by boost libraries and
the new language standard.
4. lacks network and async I/O, graphics, concurrency, serialization, and many
other facilities expected of modern languages, although that is also largely fixed
by boost libraries and (as far as concurrency is concerned) the new language
standard.

You might also like