+ 5

Whats the difference between C, C# and C++?

I just wanna know whats the basic difference between these three languages and which one is the most useful?

12th Feb 2018, 12:21 PM
An1S
An1S - avatar
3 Answers
+ 12
C is the oldest and simplest out of the 3. It's used in operating systems, drivers, firmware, integrated applications and so on. C++ is better described by its first name "C with classes". It is a language, mostly backwards compatible with C that introduces object-oriented programming (you have a truck, which has some characteristics, speed, size etc. and some things it can do, move, refuel etc. Furthermore, you can say that a truck is a type of a car, which is a type of a vehicle). However, C++ also inherits C's speed which is why it's used all the way from operating systems to video games (basically every game engine) and browsers (Chrome, Firefox). C# is an object-oriented language designed by Microsoft for the .NET Framework. The main advantage is that it's easier to use. The main disadvantage is that it's not portable. So if you write a Windows application and wanted to bring it to Linux or macOS you'd have to rewrite it in another language (whereas with C/C++ you'd just have to change a few lines of code). It also isn't backwards compatible with C. So, to summarize: C -> Embedded applications C++ -> Any portable application C# -> Windows/Xbox/Hololens apps
12th Feb 2018, 12:37 PM
Vlad Serbu
Vlad Serbu - avatar
+ 13
@Vlad That's quite a comprehensive answer from you! šŸ‘ However there's a small catch for C# as it become more versatile than before due to emergence the .NET Core. It's an initiative to unleash its power to other platforms including Linux and macOS. šŸ˜‰
12th Feb 2018, 12:43 PM
Zephyr Koo
Zephyr Koo - avatar
+ 4
Thanks for asking! also didn't know the difference
12th Feb 2018, 12:47 PM
Matthias
Matthias - avatar