First time here? Checkout the FAQ!
x
menu search
brightness_auto
more_vert
Differentiate between C, C++ and JAVA.
thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike

1 Answer

more_vert
 
verified
Best answer
S.N.BasisCC++Java
1OriginThe C language is based on BCPL.The C++ language is based on the C language.The Java programming language is based on both C and C++.
2Programming PatternIt is a procedural language.It is an object-oriented programming language.It is a pure object-oriented programming language.
3ApproachIt uses the top-down approach.It uses the bottom-up approach.It also uses the bottom-up approach.
4Dynamic or StaticIt is a static programming language.It is also a static programming language.It is a dynamic programming language.
5Code ExecutionThe code is executed directly.The code is executed directly.The code is executed by the JVM.
6Platform DependencyIt is platform dependent.It is platform dependent.It is platform-independent because of byte code.
7TranslatorIt uses a compiler only to translate the code into machine language.It also uses a compiler only to translate the code into machine language.Java uses both compiler and interpreter and it is also known as an interpreted language.
8File GenerationIt generates the .exe, and .bak, files.It generates .exe file.It generates .class file.
9Number of KeywordThere are 32 keywords in the C language.There are 60 keywords in the C++ language.There are 52 keywords in the Java language.
10Source File ExtensionThe source file has a .c extension.The source file has a .cpp extension.The source file has a .java extension.
11Pointer ConceptIt supports pointer.It also supports pointer.Java does not support the pointer concept because of security.
12Union and Structure DatatypeIt supports union and structure data types.It also supports union and structure data types.It does not support union and structure data types.
13Pre-processor DirectivesIt uses pre-processor directives such as #include, #define, etc.It uses pre-processor directives such as #include, #define, #header, etc.It does not use directives but uses packages.
14Constructor/ DestructorIt does not support constructor and destructor.It supports both constructor and destructor.It supports constructors only.
15Exception HandlingIt does not support exception handling.It supports exception handling.It also supports exception handling.
16Memory ManagementIt uses the calloc(), malloc(), free(), and realloc() methods to manage the memory.It uses new and delete operator to manage the memory.It uses a garbage collector to manage the memory.
17OverloadingIt does not support the overloading concept.Method and operator overloading can be achieved.Only method overloading can be achieved.
18goto StatementIt supports the goto statement.It also supports the goto statement.It does not support the goto statements.
19Used forIt is widely used to develop drivers and operating systems.It is widely used for system programming.It is used to develop web applications, mobile applications, and windows applications.
20Array SizeAn array should be declared with size. For example, int num[10].An array should be declared with size.An array can be declared without declaring the size. For example, int num[].


thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
...