Voiced by Amazon Polly |
Introduction
Programming languages are tools that are used by the humans to communicate with computers and get their work done. From a simple data analysis to powering a robot, all of these actions are done by coding using programming languages. There have been many programming languages available in the market and some of them had a very limited lifetime and some are in the industry for over 50 years now. Let us take time to understand some fundamental differences between the major programming languages that have been in the market starting with C,C++, Java and Python. We will first get to know the purpose of each of these programming languages and also understand some fundamental differences.
C : C programming language was developed by Dennis Ritchie in the year 1972. It is a very powerful, middle level programming language used specifically for system programming and embedded systems.
C++ : C++ was developed by Bjarne Stroustrup in the year 1979 and it is a object oriented programming language with powerful features. It is used for game development and high performance applications.
Java: Java was developed by James Gosling in the year 1991. It is a very versatile, platform independent programming language. It is used extensively for web development and app development.
Python : Python was developed by Guido Van Rossum in the year 1991. Over the years, the programming language’s popularity has grown extensively and it is used a lot nowadays for data science, automation, implementing machine learning and even web development.
S.NO | C | C++ | JAVA | PYTHON |
---|---|---|---|---|
1. | Structured programming language | Object-oriented programming language | Object-oriented programming language | Object-oriented programming language |
2. | Compiled | Compiled | Compiled & Interpreted | Interpreted |
3. | 32 keywords
Eg:- case, char |
60 keywords
Eg:- class, protected |
50 keywords Eg:- interface, extends |
36 keywords
Eg:- False, None |
4. | ||||
Rules for naming identifier | Rules for naming identifier | Rules for naming identifier | Rules for naming identifier | |
Should begin with an alphabet | Should begin with an alphabet | It can begin with the alphabet, underscore, or dollar symbol. But cannot begin with a number | Should start with an alphabet or underscore. | |
Can have numbers, underscore | Can have numbers, underscore | Keywords cannot used as identifiers | Should not contain white spaces. Can be a combination of alphabets, numbers or underscore |
|
Keywords cannot used as identifiers | Keywords cannot used as identifiers | — | Keywords cannot be used as identifiers | |
5. | Comments:- /*….*/ (multi line comment), //(single line comment) | Comments:- /*….*/ (multi line comment), //(single line comment) | Comments:- /*….*/ (multi line comment), //(single line comment), /** …. */(documentation comment) | #- Single line comment “””-Triple quotes – multi line comment |
6. | Data types :- int, char, float, double, void | Data types :- int, char, float, double, void | Data types:- byte, short, int, long, float, double,char, boolean |
Data types:- String,integer,float,complex,list,tuple,range,dictionary,set,frozenset,Boolean,bytes, bytearray,memoryview,None |
7. | Bitwise shift operators are : >>(right shift),<<(left shift) | Bitwise shift operators are : >>(right shift),<<(left shift) | Bitwise shift operators are : >>(right shift),<<(left shift),>>>(triple right shift operator) | Bitwise shift operators : >> ( right shift ) << (left shift) |
8. | Char is 8 bits wide | Char is 8 bits wide | Java uses Unicode to represent characters. It is 16 bits wide. | No character data types. Character is simply a string of length 1 |
9. | Preprocessor directives allowed Eg:- #include,#define |
Preprocessor directives allowed Eg:- #include,#define |
No preprocessor directives | No preprocessor directives |
10. | Variables need not be initialized before using it | Variables need not be initialized before using it | Variables must be initialized before using it | No explicit declaration of variables. We can start using it after initialization. |
11. | Array should be declared mentioning its size Eg:- int num[10 |
Array should be declared mentioning its size Eg:- int num[10 |
Arrays are declared without mentioning its size. int num[]; num=new int[10] (or) int num[]=new int[10]; |
Use lists Use array module Use numpy module |
12. | Explicit string data type not available | Explicit string data type not available | String data type available in java. It is a class | String data type available |
13. | Supports pointers | Supports pointers | Does not support pointers | Does not support pointers directly |
14. | Structures and unions available | Structures and unions available | Structures and unions not available | Structures and unions not available |
15. | — | Supports operator overloading | Does not support operator overloading | Supports operator overloading |
16. | — | Programs can be written in c++ without using a class | All the code in java program needs to be written in one or more classes | — |
17. | Global variables and functions are allowed | Global variables and functions are allowed | No global variables or functions | Allowed to create global variables |
18. | — | Allows default arguments in functions | Not allowed in java | Support for default argument |
19. | — | Supports multiple inheritance | Multiple inheritance not supported | Yes. Supports multiple inheritance |
20. | — | Supports constructors and destructors | Supports constructors and destructors | Supports constructors and destructors |
21. | Supports typedef | Supports typedef | Does not Supports typedef | — |
22. | Unsigned integers can be declared | Unsigned integers can be declared | No unsigned integers | No need to specify any data type at all. |
23. | Allows goto | Allows goto | Does not allows goto | Does not allows goto |
24. | — | delete operator available | No delete operator | del keyword is used to delete objects |
25. | — | Objects may be passed by value or by reference | Objects are passed only by reference in Java | Uses Pass by Object reference |
Customized Cloud Solutions to Drive your Business Success
- Cloud Migration
- Devops
- AIML & IoT
Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.
- Cloud Training
- Customized Training
- Experiential Learning
About CloudThat
Established in 2012, CloudThat is a leading Cloud Training and Cloud Consulting services provider in India, USA, Asia, Europe, and Africa. Being a pioneer in the cloud domain, CloudThat has special expertise in catering to mid-market and enterprise clients from all the major cloud service providers like AWS, Microsoft, GCP, VMware, Databricks, HP, and more. Uniquely positioned to be a single source for both training and consulting for cloud technologies like Cloud Migration, Microsoft Power Platforms, DevOps, IoT, and the latest technologies like AI/ML, it is a top-tier partner with AWS and Microsoft, winning more than 8 awards combined in 11 years. Recently, it was recognized as the ‘Think Big’ partner from AWS and won the Microsoft Superstars FY 2023 award in Asia & India. Leveraging its position as a leader in the market, CloudThat has trained 650k+ professionals in 500+ cloud certifications and delivered 300+ consulting projects for 100+ corporates in 28+ countries.
WRITTEN BY Vani Chakraborty
Click to Comment