The present generation of digital computers is made and employed as a device that facilitates and speeds up complex and time-consuming computations. In the majority of applications or programs, it can store and access a huge amount of information take part as the dominant one and is measured to be its primary feature and its ability to compute, that is to calculate or to carry out arithmetic, has in many cases become almost unrelated.
In most cases, the vast amount of information that is to be developed in some sense signifies a concept of a part of reality. The information that is accessible to the computer consists of a specific set of data about the real problem that is set and is considered applicable to the problem at hand. The data signifies an abstraction of reality because certain properties and distinctiveness of the real objects get ignored as they are peripheral and inappropriate to the particular problem. A concept of abstraction is thereby also an overview of facts.
In this chapter, you will learn about the fundamental elements of the data structure.
Characteristics of Data Types in Data Structure
- The data type chooses the set of values to which a constant will belong and which may be assumed by a variable or an expression within a program, or which may be produced by an operator or a function.
- The type of a value indicated by a constant or a variable or expression may result from its form or its declaration without the need of executing the computational process.
- Each operator and function expects some arguments of a fixed type which is represented by assigning a data type to those specific sets of arguments and yields a result of a fixed type. If an operator declares arguments of several types, such as the '+' will be used to add both integers and real numbers, then the type of the answer can be determined from specific language rules.
Types of Data Structures
In this case, you will be studying the concepts of the data structure using C++. The Datatypes are mainly categorized into three major types. These are:
- Built-in data type: These types of data types are predefined and has a fixed set of rules for declaration. In other words, these data types, when belonging to a particular programming language, has built-in support, and hence they are also called built-in data types. Examples of such data types are:
- Integer type
- Boolean type
- Character type
- Floating type
- Derived Data type: These data types can be implemented independently within a language. These data types are built by combining both primary and built-in data types and then associating operations on them. Examples of such data types are:
- Array
- Stack
- Queue
- List
You might be familiar with these basic data types if you have read either C or C++. For dealing with the various concepts of data structures, you can use any programming language. But it is recommended to use either C or C++ for better implementation purposes.
Basic Operations of Data Structures
Some specific operations process all data in the data structures. The specific data structure that has been chosen mostly depends on the number of times the occurrence of the operation which needs to be carried out on the data structure. Names of such operations are listed below:
- Traversing
- Searching
- Insertion
- Deletion
- Sorting
- Merging