Question:
what's the difference between c, c# and c++ ?
Zengibam
2008-05-21 10:09:46 UTC
man, i thought that "c" and "c#" were one programming languages but when i decided to learn "c#" i learned "c" by mistake !!!!!!!!!!!!!!!
Eleven answers:
Bill
2008-05-21 10:23:02 UTC
A very good question.



C - an older programming language that is described as Hands-on. As the programmer you must tell the program to do everything. Also this language will let you do almost anything. It does not support object orriented code. Thus no classes.



C++ - an extention language per se of C. In C code ++ means increment 1. Thus C++ is better than C. It allows for highly controlled object orriented code. Once again a very hands on language that goes into MUCH detail.



C# - Full object orriented code resembling the style of C/C++ code. This is really closer to JAVA. C# is the latest version of the C style languages and is very good for developing web applications.
2008-05-21 10:26:54 UTC
The differences are few and many. The reality is they are completey different languages.



C is a relatively small language (in terms of keywords etc) and is no object oriented whereby both C++ and C# are OO.



The biggest differences are between C# and the other two, in my opinion, as although C++ and C are totally 'unrelated' they share some traits and each can be written inline with one another, compiling succesfully (however bad this is, it remains fact), they are in the same league at least.



C++ builds on alot of what C doesnt not allow, and rather than an abstration it's more of an ehancement, though not dependant of C.



Both C and C++ can be executed in cross-platform environemtns however the coder must take heed of what is needed in order for that to be possible, ie using OS specific calls in your code will break when executed on a different platform.



C# on the other hand is a totally different ball game but syntactually carries forward alot of what programmers are used to if from a C/C++ background. C# requires the .NET Framework in order to execute, although applications can be further translated into a native image using ngen.exe.



The Mono project is in development for .NET and this allows for .NET compilations to be executed accross platforms too (Windows and Linux), though not everything is implemented.



Basically they are all different, what exactly do you want to know?



Also I see people are using Java as a reference to the likeness of C#, this is 100% crap. Syntactually all four are similar, that is where the similarity ends between Java and anything else.



Grant
Daniel B
2008-05-21 10:21:42 UTC
No, C and C# are not the same language. C is pretty standard cross platform language that has been around for a long time. C# is a much newer language that was developed by Microsoft for use with the .NET platform. Although the syntax looks a lot like C# it is quite different, really closer to Java then actual C. C++ is an enhancement to C that brings in object oriented features as well as other additions.
simpleMind
2008-05-21 10:58:53 UTC
I think it's a good thing you learned C first. Many of the features you can take for granted in C++ or C# you couldn't in C. You had to understand some of the fine details before you could develop your program. It forces you to understand what the machine is doing, which can better prepare you for C# and C++.



Anyway C is a procedural or structured language. It was designed to be used to create operating systems. Thus it needed to have features of both a low level and high level programming language. Because of Bit manipulation and things like that.



And NO C++ isn't necessarily a better language. It depends on the application. C is extremely efficient programming language. And yet it is very powerful. People get this misconception that because C++ and C# are OOP they are better at everything. This is simply not true, and this is why the C programming language is still in wide use.
2016-03-13 04:04:03 UTC
C++ is arguably the most fully implemented object oriented language to come out. With lots of neat features like being able to define your own operators, define template classes/functions for objects that operate on non-related classes thrown in for good measure. Basically it's a question of application. If you're writing drivers for your new but unsupported on unix graphics card use c. For everything else use c++.
2008-05-21 10:18:27 UTC
C was first created. Then C++ was built on to what C did (thats what the ++ means). C# is Microsoft's language to use .net It uses the same type of format/language that C++ uses, but its completely different. Its made so if you know how C++ works, learning C# is really easy. (Same with J# for Java people)
Badri
2008-05-21 10:28:38 UTC
All three are programmin' languages, c comes at the basic level n next is c++ n c# developed by Microsoft is very similar to java... so, hierarchically its like this c, c++ and java(c#). Before learning c++ n java(c#) its better to get used to c.. all three are very easy to learn.. I suggest you to refer the text "Complete Reference" by Herbert Schildt ul get to know the differences in detail!
buckingham
2016-12-12 13:29:26 UTC
C Sharp Vs C
Zeta1
2008-05-21 10:37:09 UTC
It is NEVER a mistake to learn "C". You will always use that knowledge one of these days.



C# is like Java, but with pointers if you need them. Microsoft has a free compiler called Visual C# Express Edition (see:http://www.microsoft.com/express/download/).



In the "C" language class, C# is very clean (but not perfect) and it is a charm to use. It is also available under Linux!



C++ is tough to learn, with an odd syntax, and unpredictable semantics. But it does the job.
Kokombads
2013-12-31 19:40:56 UTC
me after trying to study C++
2014-08-03 04:02:16 UTC
432r4t23d


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...