Thursday, July 30, 2009

What is easier to learn: C or C++?

C is structured programming. C++ is object oriented programming. if u learn c first, its good u'll get all the basic concepts but when u move on to C++ u'll have to snap out of the structured programming style and start thinking in an object oriented way.


i feel its best to learn C++ straight away. u have good books available in the market. and also it will help you when u are upgrading to other languages like java which are again more to with OOP concepts.

What is easier to learn: C or C++?
C is a sub set of C++ so it is more material to learn. I would try to learn C++ though.





RJ
Reply:If you hav programming experience, then go for C++.


If you are starting from the scratch and learnt Object oriented concepts, then go for C++.


If you are totally new to programming, my suggestion would be C.
Reply:Initially, C++ is a whole lot easier to learn. In the end, C++ becomes far more complicated IMO. In the beginning, you can rely on the C++ STL for things like vectors, strings, etc. You have references instead of pointers, and so on. Eventually, as a C++ programmer, you'll have to learn the C subset that exists in C++. But then afterwards, you'll have to deal with the complexities in templates, the stuff that really lies behind iostreams, and that gets *complicated*. Still, you should pick up C++ first. The semantics for generic programming really change the way you program in C++ as opposed to C.





%26gt;%26gt; (Arif) If you are totally new to programming, my suggestion would be C.


This is possibly the worst recommendation to new programmers. I do not consider throwing C string, arrays, and pointers in C something ideal for programmers. Yet to do even basic things like string input, you have to learn them, right?





%26gt;%26gt; (Scorpio) C is structured programming. C++ is object oriented


No, that's not really what it is. In fact, C++ isn't object oriented so much as generic programming. Ever heard of templates? Try replicating the semantics of C++ templates in C. But trying to think of C vs C++ as structured vs object oriented isn't the best approach.
Reply:My recommendation is C#. It is a very powerful language with simple, less cryptic syntax. Plus the express edition compiler is available for free from Microsoft.


No comments:

Post a Comment