Saturday, January 22, 2011

What is the difference between c,c++, c#(c sharp)?

C - the basis for C++. It was written in the 70s.

C++ - a "better C" (Stroustrop, guy who made it). It is an extension of C. All good C programs are also C++ programs, but the reverse is not true. Contains elements that generally make large scale programming easier.


C# -pronounced as C Sharp - not directly related to C or C++, as a C or C++ program is not a C# program. A very new langauge, much more closely related to Java than C or C++.



c# is more object oriented.....

basically the difference is in the framework
with c# you can use facilities provided by ur .net framework


also there is difference between TYPE OF APPLICATIONS u create with c# you can create various types of applications as web,dll,web srevice,windows,console etc......

also difference in COMPILATION...the effect of JIT compilation is present in .net


1) Different runtime. For C# you need to install .net framework on the deployment environment.
2) different IDE
3) You can actually debug line by line for C#
4) You have the luxury of ADO.NET


C# requires a 10-gig plug-in on the coder's or on the end-users' machine to execute. Compiled C++ code can run as a standalone executable as byte-code.

Microsoft can discontinue, without notice, at any time, the license to use .net. Microsoft can prevent the re-distribution, at any time, of the .net plug-in.

C++ is OpenSource and available as a license-free tool.


C++ is the standard version of the language. It is platform independent (C++ programs will execute on Windows, Unix, Linux, and any other operating system).

C# is a C++ that includes some Visual Basic and Java features. It simplifies the creation of GUI (Graphical User Interface) programs and windows-based menus (items that require more effort and expertise to create with the standard C++ programming). However, C# programs are designed to execute only on Microsoft Windows operating system, as Visual Basic is a Windows-only product.

Which one is better suited for you to use?. That will depend on your programming requirements. If you do your programming on Linux and Unix environment and systems, then the standard C++ is the choice. But if you do your programming entirely on a Windows-based environment, then C# is the better choice as it takes advantage of the existing Windows APIs (Application Program Interface) so that you don't need to create Windows libraries from scratch.


 

0 comments: