C, C++ - Platform Dependent
Java, Python - Platform Independent
1) What Is Data Type ?
Data types is allocating memory space to other input.
In C, C++ Data Type are treated as keyword.
Dos -> Unix
- Int 2 Byts 4 Byts
- Float 4 Byts 8 Byts
- Double 8 Byts 16 Byts
- Char 1 Byte 1 Byts
C and C++ programming language and whose corresponding data types
Varying their memory spaces from One OS to another OS, therefore these are Platform dependent.
In Java, data types are treated as keyword.
Dos -> Unix
- Byte 1 Byts 1 Byts
- Short 2 Byts 2 Byts
- Int 4 Byts 4 Byts
- long 8 Byts 8 Byts
- Boolean 0 Byts 0 Byts
As Java Data Types takes Same memory space of all types of OS and hence Java is Platform Independent language.
Pre-defined data types Can Store Single Values only not multiple Values.
- → Once we write a python program it can run on any platform without rewriting once again.
- → Internally PVM is responsible to Convert into Machine Understandable form.
- → Python is One of the platform independent Language because " In python Programming Execution environment all Values are stored in the form "OBJECTS".
- → All the Objects Can Store unlimited number of values and they will not depends on any OS.
Python Programming language is one of the platform independent because python Programming stores all the value in the form "OBJECT" with Unlimited Size.
No comments:
Post a Comment