Skip to main content

Types of Data Structure

Types of Data Structure

* Primitive data structures
* Non-primitive data structures




Primitive Data Structures

Primitive Data Structures are the basic data structures that straightforwardly work upon the machine instructions.They have various representations on different computers. The term "data type" and "primitive data type" are commonly used interchangeably. This data types are predetermined types of data, which are supported by the programming language. For example, integer, character, float, string and pointer are all primitive data types. Programmers can utilize these data types when they creating variables in their programs. For example, a programmer may create a variable called "lastname" and define it as a string data type. The variable will then store data as a string of characters.

Types of  Primitive Data Structure -

* Integer.
* Float.
* Char
* Pointer

Integer - 

An integer is a absolute number (not a fraction) that can be positive, negative, or zero. Hence, the numbers 10, 0, -25, and 5,148 are all integers. Unlike floating point numbers, integers cannot have decimal places.

Integers are a often used data type in computer programming. For example, whenever a number is being incremented, such as within a "for loop" or "while loop," an integer is used. Integers are also used to allocate an item's location within an array.

Float - 

Float is just opposite to Integer. Integer is a complete number not a decimal but Float is may be complete and decimal number also.It contains decimal numbers. For example, the numbers 5.5, 0.001, and -2,345.6789 are floating point numbers.

Character

A character is any letter, number, space, punctuation mark, or symbol that can be typed on a PC. The word "computer," for example, exits of eight characters. The phrase "Hi there." takes up nine characters. Each character requires one byte of space, so "PC" takes up 8 bytes.

The list of characters that can be composed is characterized by the ASCII and extended ASCII set.

Some of the symbols available are pretty strange and may even make you say, "That's quite a character!"

Pointer

Pointer is a variable, which include the address of another variable. If a variable contains address of another variable than it is said that first variable focuses to second. A pointer references a location in memory, and acquiring the value stored at that location is known as dereferencing the pointer.


Non-Primitive Data Structures

Non-primitive Data Types are not characterized by the programming language, yet are rather made by the programmer. They are sometimes called "reference variables," or "object references," since they reference a area, which stores the information. In the Java programming language, non-primitive data types are basically called "objects" because they are created, rather than predefined. While an object may contain any type of information, the information referenced by the object may still be stored as a primitive data type.

Types of  Non-Primitive Data Structure -

* Array.
* List.

    a) Linear List.

           a.1) Stack.
            a.2) Queue.

    b)  Non Linear List

           b.1) Graph.
           b.2)  Tree.

* Files

Comments

Popular posts from this blog

From Tradition to Trend: How Inlay Art is Taking the Modern Design World by Storm

Inlay art, a centuries-old craftsmanship, is experiencing a renaissance in the modern design world. This article explores the remarkable journey of inlay art from its traditional roots to becoming a prominent trend in contemporary design. The Rich History of Inlay Art Inlay art, also known as marquetry or intarsia, has its origins dating back to ancient Egypt and Mesopotamia. Initially, it was employed to decorate furniture, musical instruments, and architectural elements. The intricate patterns and designs were painstakingly created by embedding contrasting materials such as wood, metal, and ivory into a wooden base. Rediscovery of Inlay Art In recent years, there has been a resurgence of interest in traditional craftsmanship. People are increasingly drawn to the authenticity and uniqueness that handcrafted pieces offer. Inlay art, with its blend of heritage and artistic flair, has captured the attention of both designers and consumers alike. The Modern Interpretation Contemporary des

Inlay Artistry: Unveiling the Timeless Craftsmanship

In the world of art and craftsmanship, there exists a centuries-old technique that continues to captivate and inspire with its timeless beauty and intricate precision—Inlay Artistry. This age-old craft has left its indelible mark on history, adorning palaces, temples, and exquisite furniture with its breathtaking designs. In this journey through the world of Inlay Artistry, we will delve into its rich history, the meticulous techniques involved, and its enduring relevance in the modern era. A Glimpse into History Inlay art, also known as marquetry or intarsia, has a heritage that stretches back thousands of years. Its roots can be traced to ancient civilizations like Egypt and Mesopotamia, where artisans adorned furniture and tombs with intricate inlay designs. However, it was during the Renaissance period in Europe that inlay artistry truly flourished. Italian craftsmen, in particular, elevated the craft to new heights, creating awe-inspiring pieces that became symbols of wealth and l

The Intricate Beauty of Itmad-ud-Daula Tomb's Inlay Work in Agra

Welcome to the magnificent Agra, home of the world-renowned Taj Mahal and other architectural marvels. Today we are taking a closer look at one such wonder - The Itmad-ud-Daula Tomb. While it may not be as famous as its more grandiose neighbor, this tomb holds within it an intricate beauty that is nothing short of breathtaking. Join us as we explore the exquisite inlay work that adorns this mausoleum and discover why it's considered one of the finest examples of Mughal architecture in India. Introduction to the Itmad-ud-Daula Tomb in Agra, India Itmad-ud-Daula tomb is a Mughal mausoleum in Agra, India. The tomb was built by Empress Nur Jahan in memory of her father, Mirza Ghias Beg, who was the Prime Minister of Emperor Jahangir. The tomb is located on the banks of the Yamuna river and is considered to be a transitional work between the earlier Mughal architecture and the later Shah Jahan period. The exterior of Itmad-ud-Daula is decorated with white marble inlaid with semiprecious