answersLogoWhite

0


Best Answer

Data types tell the compiler how many bytes will be allocated to the type and how those bytes will be interpreted.

For instance, consider the following 64-bit value:

0100101001100001011011100111010101100001011100100111100100000000

In hexadecimal notation this would be written:

0x4a616e7561727900

But what does this value actually mean? Without knowing the type it's impossible to say. It could be any of the following:

- a big-endian integer: 5,359,686,481,972,721,920

- a little-endian integer: 34,184,235,089,551,690

- a big-endian float: 2.03809e+050

- a little-endian float: 2.26484e-306

- a null-terminated string: "January"

All of these are perfectly valid interpretations for the exact same binary sequence. So in order for the compiler to correctly interpret this binary sequence it has to know what data type is actually being represented by that sequence. If we tell it that the sequence is a string of 8 characters then the compiler will correctly interpret the value as the null-terminated string "January".

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

Integer types (char, int, byte, word, long, short, etc) and floating point types (float, double, etc). All other types are simply variations on the integer type, or combinations of two or more types (struct, class, etc).

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Different programming languages have different built-in classes. You can usually add your own classes.

Different programming languages have different built-in classes. You can usually add your own classes.

Different programming languages have different built-in classes. You can usually add your own classes.

Different programming languages have different built-in classes. You can usually add your own classes.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

There are really just two data types in programming. Integer data types and floating point data types. These are known as the fundamental or built-in data types. All languages support them whether they are implemented as objects (as in Java) or as primitive data types (as in C or C++). Integer data types are by far the most used type because all character types, boolean types and pointer types are intrinsically integer types. The only real difference is in the length of each type, which is ultimately determined by the language implementation. Since a computer language is composed entirely of character types, it could be argued that 1-byte characters are by far the most-used data type of all.

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

The commonly used data types are the fundamental data types: char, int, bool, float, doubleand the pointer type void*. These types (including those with signed/unsigned and long/shorttype modifiers) have corresponding representations in the underlying architecture thus they provide the basic building blocks for every user-defined type.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Different programming languages have different built-in classes. You can usually add your own classes.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the commonly used data types in programming languages?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

What are the different types of memory areas for different programming languages?

Code (readable, executable) Constant data (readable) Variable data (readable, writeable)


What is the use of constructors?

Constructors are used in object-oriented programming languages to create usable instances of abstract data types (classes).


What is data type check?

A data type (or datatype) in programming languages is an attribute of data that represents the kind and structure of the data. This involves setting constraints on the data, such as validity restrictions to values and the types of operations that may be performed upon it.


What are the examples of primitive?

Examples of primitive data types include integers, floating-point numbers, characters, and booleans. These data types are basic building blocks in programming languages and are typically directly supported by the hardware.


Do data processors separate the programming tasks from computer operation tasks?

No, high-level programming languages do that.


What are some of the different types of software programming languages?

High level languages Mid Level Languages Low level languages High level languages: cobol, fortran etc Mid level languages: C, C++ Low level languages: assembly language


What data types are?

According to Wikipedia,"In computer science and computer programming, a data type or simply type is a classification identifying one of various types of data, such as real-valued, integer or Boolean, that determines the possible values for that type; the operations that can be done on values of that type; the meaning of the data; and the way values of that type can be stored.""Almost all programming languages explicitly include the notion of data type, though different languages may use different terminology. Common data types may include:integers,booleans,characters,floating-point numbers,alphanumeric strings."


What is the definition of datatypes in programming?

A data type defines how data is represented. All data is obviously represented by a sequence of binary values, however, the data type determines how that value is to be interpreted by the language compiler. Object oriented programming languages use classes to define data types, which not only defines the representation of data but also which operations are valid for the type.


What are the basic parts of programming?

Data types and functions.


What types of data used in algorithm?

Whatever data you need. If you need the algorithm to operate with many different types of data, and you are programming in C++, you could use generic programming practices and use templates.


What is the range of data types in C programming language?

The ranges for all data types in C are implementation-defined.


What are 3 different data types?

According to Wikipedia,"In computer science and computer programming, a data type or simply type is a classification identifying one of various types of data, such as real-valued, integer or Boolean, that determines the possible values for that type; the operations that can be done on values of that type; the meaning of the data; and the way values of that type can be stored.""Almost all programming languages explicitly include the notion of data type, though different languages may use different terminology. Common data types may include:integers,booleans,characters,floating-point numbers,alphanumeric strings."