April 11, 2012

C C++ and C# - A Comparison

C, C++, and C# - A Comparison
Programming 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.

About the Author:
Rhian Gab is an experienced blogger and social media consultant in an SEO company. She works as freelance blogger and helps market articles online for various sites. She writes on varied topics that deal with innovation, web programming and design, reputation management, and online business, among others.

Related Posts :



Good Picture. It makes us understand everything before hand.

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Related Posts with Thumbnails