Posted February 4, 2011 by Spyros in C/C++ Programming

5 Reasons Why You Should Learn C/C++ Programming


1. C/C++ (especially C) are Low Level Languages That Allow you to Learn Important Programming Ideas

Some of you may already know how to program in Perl, Python or any other interpreted high level programming languages. While those are pretty useful for creating short scripts, they do not really help when you need to “understand” the machine. Creating more complex programs would need that you would have to have direct access over how memory is used. Pointers, for instance is something that you cannot utilize in these high level languages. Moreover, you would never need to know how a linked list works in a language like Python, because it provides you with everything you need to do these things automatically. While this might seem convenient, there will be a time when knowing what a list is, and being able to create it, will be crucial. If you are really interested about serious programming, C and C++ should be your main priority.

2. When Compared to Higher Level Languages Like Perl or Python, They Are Much Faster

Since C/C++ create executable binaries, an average C program runs much faster than its Python counterpart. Of course, you would expect that, since higher level languages are usually interpreted, which means that they need some sort of intermediary to run (like a virtual machine for instance when Java is accounted).

3. C++ is a Great Way to Learn How to Program Object Oriented Code Effectively

It is quite true that you can create flexible object oriented components using a high level language. However, C++ is the core of object oriented programming elements. Some high level languages may, for instance, provide single inheritance alone or no polymorphism at all. When you are looking for professional components programming, C++ is definately there for you.

4. Systems Programming is Mainly Done in C (and C++ in some cases)

There is a reason why the linux kernel code is written in C. Not only is it because of speed, but also because the internal C components (pointers, structs and more), allow the developers to have total flexibility over the very low level things that they need to do.

5. When Programming Large Projects, C++ is Most Probably the Language of Choice

You will have noticed that most large scale programming projects are created in C++. C++ is a pretty nice combination of a low level language like C, also combining some of the high level elements of a language like Python. To illustrate, the C++ Standard Template Library provides you with a vector type that can be used to dynamically allocate memory for integers, chars or whatever data structures you want to. On the other hand, using C alone, you would have to create these data structures on your own, in order to be able to even handle dynamic memory allocation and deallocation. Moreover, C++ object orientation allows you to properly modularize your programs so that you can better maintain and debug your code.