Copyright

C# vs. C++: Similarities & Differences

Instructor: David Gloag

David has over 40 years of industry experience in software development and information technology and a bachelor of computer science

In this lesson, we'll take a look at the C++ (C Plus Plus) and C# (C Sharp), what they are, some of the things that make them similar, and some of the things that make them different.

The Pervasiveness of Computers

Computers are a part of most aspects of our lives. If you don't agree, try to name an electronic item that doesn't contain one. Sure, it's possible. But it's getting more and more difficult, particularly with the recent Internet-of-Things movement. You know, that movement that wants to add everything we use to the connected world of the Internet! We're already seeing appliances like toasters and refrigerators that connect to the internet through your router. What's next? It makes sense that there is a need to control these items and provide them with instructions that define how they operate. One way to do this is through a programming language like C++ or C#.

What is C++?

C++ is an object-oriented computer programming language developed by Bjarne Stroustrup in 1979. By object-oriented, we mean that the language has the ability to define and manipulate a construct known as an object. An object is a collection of information that is combined with a specific set of operations that can be performed on the information. A classic example is that of a queue. Virtually everyone is familiar with this idea. We experience it when we stop for coffee in the morning at our favorite coffee shop. It is a first-in-first-out structure where new items are added at the back (enqueue), and old ones are removed from the front (dequeue).

What is C#?

C# is another example of an object-oriented programming language. Developed by Microsoft and released in 2002, it is much more recent than its older sibling, C++. It is also considered a general programming language, meaning that it can be applied to a number of programming tasks and problems. Today it is still quite popular, particularly for those things that use another of Microsoft's key technologies, .NET. Examples of its use fall into areas like:

  • Desktop Applications - These include standalone applications that run on your desktop computer like Microsoft Word.
  • Web Applications - These are applications that run in your web browser, such as Chrome or Internet Explorer. Google Search is also an example of this kind of application.
  • Mobile Applications - These are the apps on your cell phone or tablet. There are many examples available, like Flipboard.

How Are These Languages Similar?

These two languages are similar in a number of ways. The three most significant similarities are as follows:

  • C Language Derivatives - This refers to the syntax, the arrangement of keywords and symbols that make up the language. It is based on the C programming language.
  • Object Oriented - This means that they support classes, inheritance (the ability to create a new object from existing objects), and polymorphism (the ability of an operation to adjust to the uniqueness of an object at run-time).
  • Compiled - This means that the language statements must be run through a processing step (compiling) before they can be executed in a computer.

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account
Support