- 1
Diferença C entre C++ e C#
Qual é a diferença entre C, C++ e C# ?
2 ответов
+ 2
They are different languages.
C is the older, and still used when programming close to hardware for example Linux Kernel is programmed in C.
C++ is a standard (as C). Initially was called C with classes. It is C compatible in the sense that the C++ comiler can compile C code, and the executable should be as efficiente as the one compiled with C compiler. C++ add a lot of stuff and uses different libraries and program paradigm (object oriented, templates) which are not present in C.
Both C and C++ are compiled programs, and both are supposed to be portable (you can compile the code for many architectures and OS), and have a very big ammount of libraries for all kind of solutions.
C# is also very similar to C++, but it is intended to run on a NET environment. It was designed by Microsoft and it is used in their solutions, although it is supposed to be portable it is more suited for Microsoft OS. Memory management is done with garbage collector, that is to say that you don't have to manage memory yourself (that can be an advantage (no bugs) and a disadvantge (no control of memory allocation). C# is the newer language and its syntax is probably more clear. C# like Java is not compiled to CPU native code.
So if you want to program at low level C is the best solution.
If you want a complete portable language with "modern" features and not intended for a concrete problem C++ is a good solution.
If you want to program only for Microsoft OS probably C# is the best suited.
C# and C++ are good languages to learn how to program. Almost anything you want to program can be achieved with one of these programs.
0
Thanks