Difference between C, C++ and Java सी, सी++ एवं जावा में अंतर

C, C++ and Java are all popular programming languages, but they have many differences in their structure, functioning and usage. Below are the important differences between these languages in a simple and comparative way:-

सी, सी++ और जावा तीनों लोकप्रिय प्रोग्रामिंग भाषाएँ हैं, लेकिन इनकी संरचना, कार्यप्रणाली और उपयोग में कई अंतर होते हैं। नीचे इन भाषाओं के बीच महत्वपूर्ण अंतरों को सरल और तुलनात्मक रूप से दर्शाया गया है:-


a) C language is based on B and BCPL languages. C++ is based on C, while Java is based on both C and C++.
सी लैंग्वेज, बी और बीसीपीएल पर आधारित है। सी++ सी पर आधारित है जबकि जावा, सी और सी++ दोनों पर आधारित है।

b) C is a procedural language, whereas C++ and Java are object-oriented languages.
सी एक प्रोसीजरल लैंग्वेज है जबकि सी++ और जावा ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग लैंग्वेज हैं।

c) C uses top-down approach, while C++ and Java use bottom-up approach.
सी टॉप-डाउन अप्रोच का उपयोग करती है जबकि सी++ और जावा बॉटम-अप अप्रोच का।

d) C and C++ codes are compiled and run directly, while Java code (byte code) runs using the JVM.
सी और सी++ का कोड सीधे निष्पादित होता है जबकि जावा का बाइट कोड JVM के माध्यम से चलता है।

e) File extensions: C uses .c , C++ uses .cpp , Java uses .java 

फाइल एक्सटेंशन: सी में .c , सी++ में .cpp , जावा में .java 

f) C and C++ are platform dependent. Java is platform independent due to bytecode and JVM.
सी और सी++ प्लेटफॉर्म पर निर्भर होती हैं, जबकि जावा प्लेटफॉर्म स्वतंत्र है।

g) C and C++ use only compiler, whereas Java uses both compiler and interpreter.
सी और सी++ में केवल कंपाइलर का उपयोग होता है, जबकि जावा में कंपाइलर और इंटरप्रेटर दोनों का।

h) C and C++ generate .exe files. Java generates .class files.
सी और सी++ .exe फाइल बनाते हैं, जबकि जावा .class फाइल।

i) C and C++ support goto, union, structure, and pointer. Java does not support them.
सी और सी++ में goto, union, structure, pointer का उपयोग होता है, लेकिन जावा इन्हें सपोर्ट नहीं करता।

j) C/C++ use preprocessor directives like #include, #define. Java uses package and import.
सी/सी++ में #include, #define जैसे प्रीप्रोसेसर डायरेक्टिव्स होते हैं जबकि जावा में package, import का उपयोग होता है।

k) C and C++ are used to create system programs, OS, device drivers. Java is used for web, mobile, and desktop applications.
सी और सी++ का प्रयोग सिस्टम प्रोग्राम, ऑपरेटिंग सिस्टम, ड्राइवर इत्यादि में होता है, जबकि जावा वेब, मोबाइल व डेस्कटॉप एप्लीकेशन में।

l) In C and C++, array must be declared with size. In Java, array can be declared without size (with new).
सी और सी++ में ऐरे को साइज़ के साथ घोषित करना जरूरी होता है जबकि जावा में साइज़ के बिना भी ऐरे डिक्लेयर किया जा सकता है।

m) C does not support exception handling. C++ and Java support exception handling using try-catch.
सी में एक्सेप्शन हैंडलिंग नहीं होती, जबकि सी++ और जावा try-catch से इसे सपोर्ट करते हैं।

Comments

Popular posts from this blog

What is a Web Browser? वेब ब्राउज़र क्या है?

Java's Support System जावा का सहयोगी तंत्र

The Internet and Java इंटरनेट और जावा का सम्बन्ध