answersLogoWhite

0

The people who create the language take the liberty of deciding the size of data types in a programming lanauage.

If you (as a programmer) create your own custom data type, for example by defining a class, then you decide what goes into it - for example, in Java, if one of the pieces of data requires an integer, you have the choice of storing it as an int, which uses 4 bytes, or as a long, which uses 8 bytes (and permits larger numbers).

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the new data types for object oriented language?

Different languages have different data types. But basically, each class can be considered a different data type. For example, if a language doesn't have a data type for dates, create a class, with fields (or properties) to store day, month, year; if your language doesn't have complex numbers, create a class with two fields of some real type to store the real and the imaginary part; if your language doesn't have a data type to store information about a font (its name, size, and characteristics like being or not being bold), create a class to save information about a font, etc.Different languages have different data types. But basically, each class can be considered a different data type. For example, if a language doesn't have a data type for dates, create a class, with fields (or properties) to store day, month, year; if your language doesn't have complex numbers, create a class with two fields of some real type to store the real and the imaginary part; if your language doesn't have a data type to store information about a font (its name, size, and characteristics like being or not being bold), create a class to save information about a font, etc.Different languages have different data types. But basically, each class can be considered a different data type. For example, if a language doesn't have a data type for dates, create a class, with fields (or properties) to store day, month, year; if your language doesn't have complex numbers, create a class with two fields of some real type to store the real and the imaginary part; if your language doesn't have a data type to store information about a font (its name, size, and characteristics like being or not being bold), create a class to save information about a font, etc.Different languages have different data types. But basically, each class can be considered a different data type. For example, if a language doesn't have a data type for dates, create a class, with fields (or properties) to store day, month, year; if your language doesn't have complex numbers, create a class with two fields of some real type to store the real and the imaginary part; if your language doesn't have a data type to store information about a font (its name, size, and characteristics like being or not being bold), create a class to save information about a font, etc.


What is size of char far data type?

char is a primitive data type and depends on the programming language and the operating system.


How do you find out the size of all the data types in C program?

sizeof is your friend.


What are the data types in VBNET?

In VB.NET, data types can be categorized into several groups: value types (such as Integer, Double, Boolean, and Char) and reference types (such as String, Object, and arrays). Value types store data directly and have a fixed size, while reference types store references to the actual data. Additionally, VB.NET supports user-defined types through structures and classes, enabling developers to create complex data types tailored to their applications.


Why do we have 2 DATA types of same size for integer?

One of them is signed, the other is unsigned.


How many bytes in a variant?

In programming, a variant typically occupies 16 bytes (128 bits) of memory. This size allows it to store different types of data, such as integers, floating-point numbers, strings, and other data types, by using a tagging mechanism to identify the type of data being held. The exact implementation may vary slightly depending on the programming language or system architecture.


What are the commonly use data types with their equivalent size in solving the base address of an array?

int


Which type of data uses the least bandwidth?

Primitive data types are smaller in size and hence are efficient in processing and use the least bandwidth.


What are arreys in c?

arrays in C are the data types which have collection of same type of data together store a fixed-size s of elements .


How do you change data types range in c?

You can not change the range of a data type. It is a function of the implementation and is dependent on the word size of the implementation's computer hardware.


Is it necessary to have same size for all members in an union?

it is not necessary to have same size for all members in an union ..because unions holds different data types..


IS it necessary to have same size for all members in an union Explain?

it is not necessary to have same size for all members in an union ..because unions holds different data types..