+ 3

Difference between c,c++ and c#?

2nd Dec 2016, 9:11 AM
pokemon
4 Réponses
+ 4
I am not quite sure about C so I will not state much about that. But I do know that there are quite a few number of difference between C++ and C#. Visible difference are : - For C# Switch Statement, the test variable can be a string while C++'s test variable cannot be a string. - C# have public, private, protected, internal and protected internal for access modifiers while C++ does not have internal and protected internal as access modifiers. - C# has finally block in exception handling mechanism(try-catch) while C++ does not have it. - The exception in C# can only throw a class that is derived from the 'System.Exception' class while the exception in C++ can throw any class. - C# does not have pointers(or the function pointers) but C++ has it. [C# have something similar instead, its called 'Delegates'] There are of course more differences that I have not pointed out, you can google them out if you want.
2nd Dec 2016, 9:23 AM
Wen Qin
Wen Qin - avatar
+ 1
I know c++ is derived from c,but what's the difference?Does it have any similarity with c#?
2nd Dec 2016, 9:12 AM
pokemon
0
@K2 Shape thanks
2nd Dec 2016, 9:33 AM
pokemon
- 1
c++ is superset of c. it supports c completely. c c is procedural oriented ice follows top to bottom approach. few enhancements are made in c++ such as header file formats. major difference is object oriented approach included in c++. here classes and objects use makes handling of data more safer.
2nd Dec 2016, 1:01 PM
Bibek Ghimire
Bibek Ghimire - avatar