C C++ and C# - A Comparison

C++ offers much more than C, as it has templates, exceptions, and classes, and comparatively easier to learn. C# on the other hand is made for .NET environment by Microsoft, and is much simpler than C++. C was mainly redesigned into C++ to make it an object oriented programming language, whereas C# has more focus on design with OOP. The similarities between the three languages are mainly to do with their syntax.
If you compare C and C++, the former can be considered the root of the later, and they share many functionalities, libraries and of course syntax. Both languages also share similar functionality in pointers, strings, arrays, unions and structures. Comparing C# to these two, we find it has inherited quite a few of the statements, keywords and operators from C++.

C++ and C are compiled languages, whereas C# is an Interpreted language. The distinct advantage of an interpreter is that it reads, analyzes, and executes each line, making it convenient for making changes, and debugging. For compiled languages on the other hand, the program has to be fully written and then compiled, to run it. Bugs in the program will be comparatively difficult to detect, and the whole process of compilation has to be repeated to see if the program has been successfully debugged. However, a compiled language runs much faster than interpreted language, and therefore C++ is the preferred choice for programming games.
C++ lost its charm with internet and network developers, once Java came on to the scene, but C# has brought focus back to the C family. C# was developed by Microsoft jointly with Anders Hejlsberg, an expert in Delphi and Turbo Pascal. The result was a potent combination of C++, Delphi, and Java, coming together to form a unique programming language that is component oriented. However, it is much more functional and compatible than Java, and holds many similarities with C++. The constructors between the two are quite similar, and both have non-virtual methods by default.
Before starting a C tutorial it is good to know the differences and similarities between C, C++ and C#, as it can give you a broader perspective of their individual capabilities.
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...
 
Posts RSSComments RSSBack to top
© 2013 Updated Tech News Results and Reviews