Difference Between C, C++ And C#? - And some other questions.

Pages: 1, 2
free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > C/C++ Programming

Difference Between C, C++ And C#? - And some other questions.

moodsey211
QUOTE(coolcat50 @ Jul 14 2008, 11:51 AM) *
C++ is simply a redesign of C. It is called C++ because it added one major thing to C, and that would be object-oriented programming. C# is basically Microsoft's implementation of C++ in the .NET enviroment. At least that is what I have heard.


There is actually C++.NET or most commonly know as C++ 8.0. So I don't think C# is the .NET implementation of C++. biggrin.gif

Reply

bittr
C and C++ are now clear, I think.

C# language is a procedural, object-oriented syntax based on C++ and includes influences from aspects of several other programming languages (most notably Delphi and Java) with a particular emphasis on simplification.

C# was specially developed as part of the .NET framework. In use with ASP.net, it is the first option.

It is in my opinion the best programming language now existent. And with the greatest future, at least until some other thing gets invented.

So, if you are looking to concentrate on learning somethin, I highly recommend it.

Reply

moodsey211
But C# have it's pros and cons. In my opinion is not that great. I would still prefer C++. C# is for Windows platform only. while you can have C++ on linux or any unix based OS. For me, C# can't replace C++.

Reply

iGuest
difference between c++ and vb.
Difference Between C, C++ And C#?

In my recent interview , they asked what is the difference between vb and c++..



-reply by priya

Reply

xico
The real difference between with C and other two is that :

* C is structured prgramming language.
* Other languages are Object Oriented programming Languages.

Ok, this is correct, but the main difference between C++ and C# is that C# has more approach with High Level programming by using features like Garbage Collector and special Classes for working easily with WEB, for example. C++ lets the programmer do all the job, but gives you more powerful and speedy.

Reply

dimumurray
As far as the differences between C and C++ go, most of you have got it right. But the origins and nature of C# tends to be somewhat murky in this discussion.

I'll try to clear that up a bit.

Before microsoft created C# they created J, which was their answer to Java (created by Sun Microsystems). Sufficed to say, that language just did not take off as a platform and fell flat on its face. It is rumored that Microsoft was so ashamed of its creation that at one point they denied its existence. In any case with the advent of the .Net platform they took another stab and created C#.

The syntax of C# is very close to Java, more so than it is to C++. Like Java it has interfaces and a single-inheritance hierarchy.
What does that mean? Let's start with the whole single-inheritance hierarchy thing. C++ allows for multiple inheritance, that means a class can have more than one super class. There are inherant problems with multiple inheritance, however. Let me give you the classic Diamond Of Death scenario. You're given four classes. Classes B and C are subclasses of Class A, and Class D --using multiple inheritance-- is a subclass of both B and C. Class A sits at the top of the heirarchy, B and C sit on a level below and D is on the 3rd and last level(if you play connect the dots following the classes in the following order A-B-D-C-A you get a diamond).
Let say both classes B and C override the method 'foo()' of their super class A, but class D inherits from B and C without overriding any methods. How does D resolve calls to its inherited method 'foo()'. It can't. Hence the fabled 'Diamond of Death' (queue menacing sound).
The Java designers decided to implement a single-inheritance scheme to remedy this issue. That meant that a class can inherit-from/extend/subclass one and only one super class. To compensate for the loss of functionality that multiple inheritance provided, Java introduced interfaces. Think of them as classes whose methods have no body, that is, they have no implementation.

Interfaces look something like this:
CODE
interface Movable{
    public void up();
    public void down();
    public void left();
    public void right();
}



Now, in addition to their extends keyword Java and C# also have the implements keyword for interfaces. When the implements keyword is followed by the name of an interface, a class is required to implement all the interface's methods as seen below:
CODE
class Car extends Vehicle implements Movable{
    // ...other code


   public void up() {
       // implementation goes here
   }

   public void down() {
       // implementation goes here
   }

   public void left() {
       // implementation goes here
   }

   public void right() {
       // implementation goes here
   }
}


A class can implement as many interfaces as it likes and since every class that implements an interface has to provide its own implementation of that interface's methods the DOD (Diamond of Death) scenario never arises.
Java also supports garbage collection(i.e. freeing memory occupied by unused objects) and in the true spirit of mimicry so does C#.

And that, as far as I know, is the difference between C# and C/C++. As for C# and Java, this is what one of my former professors told me "Java uses 'String', C# uses 'string'". Nuff' said smile.gif.

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Pages: 1, 2
Recent Queries:-
  1. different between c and c# - 2.58 hr back. (1)
  2. what is the similarities and differences of c language and c - 8.73 hr back. (1)
  3. diference c# c and c - 8.87 hr back. (1)
  4. difference java c c - 8.89 hr back. (1)
  5. difference c c - 13.27 hr back. (1)
  6. difference between c,c ,c# - 13.71 hr back. (1)
  7. different between c, c & c# - 15.56 hr back. (1)
  8. difference c/c and c# - 16.18 hr back. (1)
  9. difference between c,c ,java - 17.73 hr back. (1)
  10. difference between c and vb - 19.95 hr back. (1)
  11. difference between c and c - 20.42 hr back. (2)
  12. difference between c c# and c - 22.34 hr back. (1)
  13. whats the difference between c/c# - 28.99 hr back. (1)
  14. `difference between c#,c,java - 30.48 hr back. (1)
Similar Topics

Keywords : difference, c, c, c, questions

  1. The Difference In Variables?
    (3)
  2. Commonly Asked C/c++ Questions
    (0)
    Commonly Asked C/C++ Questions
    -------------------------------------------------------------------------------- Here are some
    answers to commonly asked C/C++ questions on the forum. If you are new to the forum, please read
    this thread as your question may already be answered here. This guide is divided into many sections:
    0. Frequently Asked Newbie Questions (how do I pause output, compile my program etc.) 1. Converting
    types 2. Formatting Output 3. String manipulation (copy, concatenate, replace etc.) 4. File
    Manipulation (File size, dir contents, remove files etc.) ....
  3. Questions
    about c (3)
    I want to learn new prog languages, and I chose C. But there are many problems, I don't know
    where to begin /unsure.gif' border='0' style='vertical-align:middle' alt='unsure.gif' /> . Can
    you tell me some compilers (free if its possible), editors, tutorials, websites talking about it,
    hints, opensource programs, or any other thing? Please help a begginer /biggrin.gif' border='0'
    style='vertical-align:middle' alt='biggrin.gif' /> Thanks....

    1. Looking for difference, c, c, c, questions

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for difference, c, c, c, questions

*MORE FROM TRAP17.COM*
advertisement



Difference Between C, C++ And C#? - And some other questions.



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE