a little question

Posted on 2003-02-26
Medium Priority
Last Modified: 2010-04-15
ive just finished a semester in the uni learning C.
i was wondering  - is c just an old progamming language, or does it have ANY advantages over, say, c++ or java ?

thanx in advance!
Question by:shigwhig

Expert Comment

ID: 8026771
Hmmm, sounds like a loaded question, and while it may be "little" in terms of number of words, it sure is "big" in terms of issues it can cover <grin>

Anyhow, as you are probably aware, some of the key differences are:

1) C is procedural, C++ & Java are object-oriented, the relative merits of which can be debated in more space than I have here....

2) You can think of C++ as a super-set of C - you can compile and run a C program in a C++ compiler just fine, as well as use a little or a lot of C++ constructs, without ever defining a class, but you would be missing out on many of the great features of C++

3) C and Java are very different and truly force you to think of the problem you are trying to solve differently.  To write "pure C++" you are also forced to think differently (boy, will that start a long thread...)

So, with the above said, you can see that C can't really have any advantages over C++, since anything you can do in C, you can do exactly the same way in C++.  However, there are a number of reasons why you might choose one language (C, C++, Java, VisualBasic, PERL, etc) over another for any given problem.  

Expert Comment

ID: 8032380
C doesn't have any advantages over C++.
Conversely C++ has many advantages over C!
Many people call C++ as "Better C"!
Since you have already learnt C, it will be easier to learn C++. But, the only difficulty will be to come out of the mindset of structured programming, in order to use the powerful concept of object orientation.


Expert Comment

ID: 8032719
I come across 0 limitations using plain C.  I understand C++ but I am not well versed in it.  I've yet to come across any need to use C++ over C.
I consider C++ a bloated version of C :)   However both have multitudes of advantages over languages like Java. Not necessarily from a developer's point of view, but from a code execution point of view.
Become an IT Security Management Expert

In today’s fast-paced, digitally transformed world of business, the need to protect network data and ensure cloud privacy has never been greater. With a B.S. in Network Operations and Security, you can get the credentials it takes to become an IT security management expert.


Expert Comment

ID: 8033420
While you might not come across many limitations in plain C, C++ DOES offer many advantages.  Again, object-oriented capabilities are, in itself, a significant differentiation that are well (better) suited for many development tasks than a procedural language.  But also the support of templates, exceptions, etc, not to mention a very rich set of class libraries that ease many development tasks.

Of course, it also depends what you are familiar/comfortable with...

Accepted Solution

skeid21 earned 100 total points
ID: 8050589
I would agree with gi62 that it can mainly depend on what you are familiar/comfortable with..  It can be taken a step further to be said that with the exception of cetain things such as graphics, gui, etc. a program can be written just as well in any language given that the programer uderstands that language well.  It is important to note that a program that may take much more code in c could easily be written in c++ or java in many lines of code less.  In addition, languages are used when their strengths are needed ex: fortran still around 'cause anything to do with math can be coded verywell in it; simerily c++ is used for most games; also c is used widely with the incorporation of assembly language to write o/s's  So in conclusion(j/k sounds like a paper huh?) if a language is around there is a use for it, and thus it does have some advantage over other languages in some respect whatever that may be.

Expert Comment

ID: 8055318
Did you get your answer!?


Author Comment

ID: 8089558
thank u all.

Featured Post

WEBINAR: GDPR Implemented - Tips & Lessons Learned

Join the WatchGuard team on Thursday, March 29th as we recount some valuable lessons learned in weighing the needs of a business against the new regulatory environment, look ahead at the two months left before implementation, and help you understand the steps you can take today!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
There's never been a better time to become a computer scientist. Employment growth in the field is expected to reach 22% overall by 2020, and if you want to get in on the action, it’s a good idea to think about at least minoring in computer science …
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

619 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question