Difference between C++ and C#

by olakh
8 replies
What is diff between C and C#?
Give me your point of view about this?
#difference
  • Profile picture of the author Ibcontact
    I have little knowledge about programming languages
    But C# advanced than C and C++.
    Like some short way in c#
    {{ DiscussionBoard.errors[4321898].message }}
  • Profile picture of the author windfinder
    That question is so broad it will require an answer way bigger than anyone has time to write here.

    The biggest difference is that c# is a managed language and hence some what machine independent.
    {{ DiscussionBoard.errors[4323200].message }}
  • Profile picture of the author Musique
    C# is a higher level language than C++, it's easier to learn as it provide many features like automatic memory management(garbage collection) and all the tools of the .NET framework. but generally speaking. programs written by C# can only work on Windows(though by simulation it can work on other systems).
    {{ DiscussionBoard.errors[4325243].message }}
  • Profile picture of the author Subsonic
    Basically C++ is much older and much more widely used programming language. It's also very effective in terms of speed so it's used in nearly everywhere from games to operating systems. For example Windows OS, Mozzilla Firefox, Winamp and Photoshop are written mostly in C++.

    Quote from somewhere I don't remember:

    "C++ was designed to be a low-level platform-neutral object-oriented programming language. C# was designed to be a somewhat higher-level component-oriented language"

    For example C# compiler in Visual Studio (an IDE for C#, VB.Net etc. development by Microsoft) is developed with C++.
    {{ DiscussionBoard.errors[4328006].message }}
  • Profile picture of the author Jake Gray
    Here is how I would prioritize them:

    C++ = WIN32
    C = Linux
    {{ DiscussionBoard.errors[4328619].message }}
    • Profile picture of the author johnsmith22
      [DELETED]
      {{ DiscussionBoard.errors[4331259].message }}
      • Profile picture of the author Subsonic
        What the f*ck johnsmith22, direct copy paste from a blog... Didn't even bother summarizing the post so others would get some help from that?
        {{ DiscussionBoard.errors[4331565].message }}
  • Profile picture of the author Siegfried
    C# is microsoft thing, used in windows/xbox programming
    C,C++ are world standards, commonly used in programming on all kind of platforms
    {{ DiscussionBoard.errors[4331897].message }}
  • Profile picture of the author pratap295
    Following are difference between c++ and c#
    Difference Between C# and C++ :-
    1. Classes in C# are defined are implemented at the same place and so there is no need for using header files.
    2. C# does not use header files as it compiles directly from the source code to the executable code.
    3. C# does not use semicolon at the end of class definition.
    4. C# does not support pointers for manipulating data. However, they are used in codes declared as unsafe.
    5. C# does not contain any default constructor.
    6. Behaviour of the command line arguments is different in C# as compared to C++.
    7. Abstract of C# cannot be implemented.
    8. C# does not support macros.
    9. Objects in C# can only be created using new keywords.
    10. C# allows the switch statement to be used with string values.
    11. C# does not support multiple inheritance.
    12. Declaration of array is different in C# as compared to C++. Arrays in C# are of reference type while in C++ arrays are of value type.
    13. C# does not support the header file,# include.
    14. All the data types in C# are inherited from the object super class and therefore they are objects.
    15. In C#, structs are of value type.
    16. C# does not support the typed of statement.
    17. C# supports native Boolean type and Boolean type data can be implicitly or explicitly cast to any data type except object.
    18. C# does not support default arguments.
    Signature
    {{ DiscussionBoard.errors[4332097].message }}

Trending Topics