Jump to content
xisto Community
Sign in to follow this  
H R

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

Recommended Posts

One good thing about C# is that when it comes to game development, it's the best choice developers have. Java is memory leaker and extremly resource hungry. C++ has issue with memory management, unless people have some better framework to play with there is a lot of hassle for game developers. Besides that there are plenty of gaming framework and tools coming up for c#. As there is Mono coming in for Linux so there is no loss of using C# for gaming. Atleast it is much better than C/C++ if you're into game development or want to start developing games.

Share this post


Link to post
Share on other sites

It's a little strange for me to see people posting that C# is a clone of Java, but C# syntax is similar to C++, it's practically C++ with .NET framework, but with additions, that were available on Java, but in this case what is Java? It's a clone of C++ written from scratch, which has similar syntax of C++, but it had to be a language which could be easier to use and got some new features.. So basically C# is a language from Microsoft to use their .NET framework as much and better as possible and steal part of the market from Java which got so pupular in those years, but it;s popularity is dropping every year.
http://en.wikipedia.org/wiki/Comparison_of_Java_and_C++
http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_JavaSo
both C# and Java is an easier to use and integrate clone of C++ offered for different an wider audience of programmers.In any way, C++ is far more superior language to create real software and games, where C# can be used to create quite simple applications which doesn't require a lot of computer power, as it tends to be slower. C# is good if you need to write a program to do something, but for system programming, graphics, games, real-time and embedded systems, etc, C++ is a much better choice.With C# you can create a simple program with GUI in lets say an hour, it depends on the functionality, I usually use it at my workplace when I need to do something quite simple using a GUI.

Share this post


Link to post
Share on other sites

I don't know but i find that for memory mangement java and C# does a better job than C++. C++ has no way of dealing with it as it's not interpreter based language. Besides that for gaming and cpu intensive work C++ will fetch more memory than any other language be it java,python or C#. Atleast as per my observation C# is good for gaming i.e game development.

Share this post


Link to post
Share on other sites

C# has nothing to say in image processing with intel opencv. The performance of opencv in detecting shapes and colors, face detection, object tracking , ... is twice more than the performance of opencv(emgucv) in C#. c and c++ are almost the same in this manner but c has the advantage of using in embedded systems like armv7 processors. Also C# is based on .net so it's not completely cross platform because you can not use your software in linux but c++ is a cross-platform language and you can change your software form windows compatible to linux compatible one with only a few changes. there is a mono project which is trying to bring .net apps to linux but the performance is very low and most of the apps doesn't run with it.

Share this post


Link to post
Share on other sites

Mono has good performance atleast on ubuntu and there is one team working at ubuntu which helps app compatibility and testing. So if you're getting any app from official repository then chances are it is already tested and working. Most of the compatible apps of mono are already in repository and many people are not even aware of that it's there in the repository of ubuntu.About app outside the universe repo, i think people need to work on their own for that. Because if not supported by distro then you are on your own anyway. That's linux for ya.

Share this post


Link to post
Share on other sites

To learn a good programming language,concerns approach to the logic is to be considered seriously.Apart from these coming to programming language,C is the basic and is considered as the root language for the programming. Coming to the differences between both of them,C follows a top down approach in problem solving whereas C++ follows bottom up approach.C is a structured oriented,C++ is object oriented.Security is more in c++ as it is private by default,where as C is public by default.Level of abstraction is same in both in C and C++.Scope of variables is high in C++ compared to C.

Share this post


Link to post
Share on other sites

C is the basic and is considered as the root language for the programming.

Academic misconception. C has nothing to do with being a root language of programming. You seem to be from india and people over there teach C/C++ religiously and this is the reason for misconception. Many people learn programming from ruby, python and other languages which are based on interpreter. It has nothing to do with being a root language for the programming. In fact C makes you fail at many places and you end up wasting lot of time. On the other hand python, ruby can be quickly learned and help to learn other languages quickly.

Share this post


Link to post
Share on other sites

actually i think using c for pc apps is wasting of time and using c# (where you can) is the best job among c++ and c because for every simple job in c you should write yourself a code which in c# most of them are just available without any noticable performance difference but when it comes to microcontrollers and microprocessors like arm based ones (arm 9,11 arm cortex m3) using any language other than c is wasting your time . c is the main language which is used for embedded systems. c++ is used in embedded systems too but in this approach every single byte of ram or every nano second delay is important (which forces some eng. to use assembly) so c wins in this approach. and c# because of it's structure and depending on .net can not be used in microcontroller programing.so C is not useless at all.

Edited by Iniyila (see edit history)

Share this post


Link to post
Share on other sites

C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie.c++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.C# is a another programing language.C# is a develop on Microsoft company.

Share this post


Link to post
Share on other sites

C is the building block for all the programming languages.To be expert in current languages,one must be expert in C.C++ is the superset of C and contains the concept of OOP's.C is a procedural language and C++ is an object oriented programming language.

Share this post


Link to post
Share on other sites

C programming finds use in performance-oriented computing. If you care more about functionality than about performance, Java and C# are the programming language of choice. If you want to write more manageable code with a little performance trade-off, you can use C++ to write your software. However, you can still find better performance with C++ than with Java or C#.If you are writing computer games, C and C++ should be your programming languages of choice because of the performance. If you write your games in Java and C#, gamers playing your game would require lots of processing power unless you are building something that is not heavy on graphics and processing.BTW, if you have been following the developments in Java, most of them are to simplify the development of business applications. Enterprise Java technologies help in making your application more scalable, more reliable, and more secure. Although Java does have support for 3D graphics, through JOGL, and audio, through features in Java SE, what you do with Java comes at a performance cost because Java performs checking on array bounds, data type size limits, and overflow checks. If you write your code in C or C++, you can write your code without performing any of the checks if you decide that your code does not need them, such as if your application works with values that would not cause overflows or go beyond the limits of a data type. If you do, however, want to perform checks for data type size limits, operator overflow checks, and array bounds.

Share this post


Link to post
Share on other sites

So if I were to start out with a programming language (understand I know nothing of any language), which would you recommend (take into consideration which one is mostly used now and day), C#, C++, or Java? If I were to learn C++ would I basically know C# or how close are they together and stuff?

Share this post


Link to post
Share on other sites

So if I were to start out with a programming language (understand I know nothing of any language), which would you recommend (take into consideration which one is mostly used now and day), C#, C++, or Java? If I were to learn C++ would I basically know C# or how close are they together and stuff?

 


To learn a language that's widely used is not the actual case, but rather to choose a language that fits your particular interests, including language syntax and what that particular language is optimal for (and perhaps capable of) employing.

 

For example, some like languages that are less systematic and are influenced less by the original assembly code and more by an actual, humane language (such as English); such case would be Perl, who inherits so many words from the English language that some have even created poems using its syntax.

 

Others like a more static and raw language type such as that of C that works closer to the metal (phrase for saying it runs almost alongside the computer's hardware).

 

But, cosmetic features aside, it all depends on what you plan on developing and how well you adjust to new things.

I first learned a language called Lua, a simple language often used to extend programs written in other languages like C as a language for extending the base program's capabilities (in other words, modding), which I used to create several modifications for a game I played.

 

Generally, choosing a language that has an extensive community will always benefit you in ways languages that don't, won't, due to the fact that the community can offer you help when you need it and maybe form a team with you to create a project.

 

The game development community often praises languages like C and C++ for their raw performance and portability, although they can be very hard to learn for a beginner with no background experience. Just keep in mind that you aren't limited to just C and C++ just because they receive alot of praise; languages like Python, Visual Basic and Lua are often better choices for first-timers due to their simpler syntax and extensive capabilities(though each person varies in tastes and capabilites).

 

For macro/utility development, any language is suitable provided it's compatible with the major operating systems. A common choice is Java and Python, but most languages are suitable for such.

 

(sorry if I derailed my post ... I tend to do that :/ )

 

 

 

All in all, it just depends on what kind of person you are.

My personal recommendation is to do a bit of research. Ask questions on programmers' forums, visit languages' home pages and get a grasp of how things work and try to find a language that suits your tastes and interests.

 

 

As for the original question, C# is more like Java than anything. Chances are if you know Java, you probably know C# aswell.

C++ could be considered the black sheep of the three. I don't know much about it, but it's unlike C# and Java.

Share this post


Link to post
Share on other sites

The way I see it (or: "Hello World" according to yours truly.)I use C (ANSI C) when programming PIC micro controllers ( not the "hobby versions" Arduino and Netduino - which are great products). Wish I didn't have to use C cuz the compiler keeps protesting when I throw in C++ and C# stuff.I would use C++ if I made a living programming.I pretty much use VB 2010 Express for everything else, but still write my .dll's in DevX C++. ( Gave up assembler eons ago.)So, what is the diff for me? Personal preference.Neither language is "Hard" to learn - but its har work to become good in any of them.Tom

Share this post


Link to post
Share on other sites

The way I see it (and this is only my feeling about it, I am no expert), is that C++ attempts to increment on C functionality without costing too much efficiency overhead. In other words, C++ will compile C code without losing efficiency. On the other hand, C# is more of a modern-day language, simplified at the cost of efficiency.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.