Data Type In Algorithm

Data type is a grouping of data based on content and its nature. Each data has a data type, whether it is a round number, fractional number or a character, and so on. In the computer field, data type is a type of data that can be processed by a computer to meet the needs of computer programming.

Any variables or constants that exist in the kegiatan code, we should determine the exact data type. Selection of variable data types or constants will greatly determine the use of computer resources. One of the important tasks of a programmer is to choose the appropriate data type to produce an efficient and high-performing program. There are many types of data available, depending on the type of programming language used. Broadly speaking data types can be categorized into three kinds of basic data types, Composite data type, and abstract data types.

1. Basic Data Type

Basic data types or simple or common data types are also called primitive data types are data types that already exist and used as standard in a particular programming language. The contents of this simple data type are single data. Basic data types are provided by kegiatan so that programmer can directly use.

The following are the Basic data types:
a. Integer
Integers are ..., -3, -2, -1, 0, 1, 2, 3, 4, and others that are not fractions.

b. Float atau double
Float or double is a real number that contains decimal fractions.

Example:
3.45, 6.777, and others

c. Char or character
Char is all the letters in the alphabet, punctuation and special characters. Characters are written between two single quotes.

Example: 'A'

d. Boolean
Boolean is a logical data type consisting of two true or false statements. True statements are usually written True or numeric, whereas false statements are written with False or number 0. Whereas commonly used arithmetic operations are or, not and and xor.

2. Composite data type

Composite data type is a data type formed from a basic data type with the intent of giving programmers work. Entered in the data type of the formation is an array, string, record, union, struct, and so forth. The purpose of the created data type is:
  • Simplify the process of programming
  • Simplify the addition of variables
  • Simplify the data grouping so that it's more organized

3. Abstract Data Type

Abstract data type is a mathematical model of data objects that refine the data type by way of mangaitkannya with functions that operate on the data concerned.

Similarly this article.
Sorry if there is a wrong word.
The end of word wassalamualaikum wr. wb

Referensi :
  • Ebook Logical and Algorithm

Sumber http://matematikaakuntansi.blogspot.com

Berlangganan Informasi Terbaru:

0 Response to "Data Type In Algorithm"

Posting Komentar