Popular Posts

Friday, March 6, 2009

Table Comparing C, C++ and Java















FEATURECC++JAVA
Paradigms Procedural Procedural, OOP, Generic Programming OOP, Generic Programming (from Java 5)
Form of Compiled Source CodeExecutable Native CodeExecutable Native CodeJava bytecode
Memory managementManualManualManaged, using a garbage collector
PointersYes, very commonly used.Yes, very commonly used, but some form of references available too.No pointers; references are used instead
PreprocessorYESYESNO
String TypeCharacter arraysCharacter arrays,objectsobjects
Complex Data TypesStructures, unionsStructures, unions&classesclasses
InheritanceN/AMultiple class inheritanceSingle class inheritance, multiple interface implementation
Operator OverloadingN/AYESNO
Automatic coercionsYes, with warnings if loss could occurYes, with warnings if loss could occurNot at all if loss could occur; msut cast explicitly
Variadic ParametersYESYESNO
Goto StatementYESYESNO

No comments:

Post a Comment