3 ms·
As the others are saying, it very much depends on what you're trying to accomplish. I'll start off by saying that C is a much, much simpler language than C++ a
by Symmetry 13y ago
As the others are saying, it very much depends on what you're trying to accomplish. I'll start off by saying that C is a much, much simpler language than C++ and unless you're looking to make a serious investment it might be better to just learn C, even though C++ adds a lot of genuinely useful stuff.
You might consider learning C{,++} if:
If you need to interface with hardware at a very low level, such as when you are programming a microcontroller or writing a device driver.
You have a reasonably small application and you need the best performance possible. Don't use them because "C++ is fast". C++ is fairly fast by default, but so are many other languages where it's harder to shoot your foot off. Use C or C++ because of the greater scope for optimization in memory layout and other sorts of painstaking optimizations.
Learn it because you want to create a library that can be used by many other different languages. Pretty much any language has some method of calling a C function, it's pretty simple. Making calls between languages that have their own garbage collectors is more complicated.
Learn it to teach yourself about how your computer works. you could also use assembly language here, but C works well enough. Getting a sense for how other languages work under the covers can help you understand performance trade offs in other languages better.