0% found this document useful (0 votes)
14 views10 pages

Structure (Data Structures) - Javatpoint

The document provides an overview of structures in data structures, defining them as composite data types that group variables under one name in memory. It highlights the advantages of structures, such as holding different data types and facilitating the implementation of other data structures. Additionally, a sample C program demonstrates the use of structures to manage employee data.

Uploaded by

emilratiu00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views10 pages

Structure (Data Structures) - Javatpoint

The document provides an overview of structures in data structures, defining them as composite data types that group variables under one name in memory. It highlights the advantages of structures, such as holding different data types and facilitating the implementation of other data structures. Additionally, a sample C program demonstrates the use of structures to manage employee data.

Uploaded by

emilratiu00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

1/20/25, 8:53 PM Structure (Data Structures) - javatpoint


Home Python Java JavaScript HTML SQL PHP C#

DS Tutorial

DS Tutorial

DS Introduction

DS Algorithm

Asymptotic Analysis

DS Pointer

DS Structure

DS Array

DS Array

2D Array

DS Linked List

Linked List

Types of Linked List

Singly Linked List

Doubly Linked List

Circular Linked List

Circular Doubly List

https://www.javatpoint.com/data-structure-structure 1/10
1/20/25, 8:53 PM Structure (Data Structures) - javatpoint

Skip list in DS

DS Stack

DS Stack

Array Implementation

← prev next →

Structure
A structure is a composite data type that defines a grouped list of variables that are to be
placed under one name in a block of memory. It allows different variables to be accessed by
using a single pointer to the structure.

Syntax

struct structure_name
{
data_type member1;
data_type member2;
.
.
data_type memeber;
};

Advantages

It can hold variables of different data types.

We can create objects containing different types of attributes.

It allows us to re-use the data layout across programs.

It is used to implement other data structures like linked lists, stacks, queues,
trees, graphs etc.

https://www.javatpoint.com/data-structure-structure 2/10
1/20/25, 8:53 PM Structure (Data Structures) - javatpoint

Program

#include<stdio.h>
#include<conio.h>
void main( )
{
struct employee
{
int id ;
float salary ;
int mobile ;
};
struct employee e1,e2,e3 ;
clrscr();
printf ("\nEnter ids, salary & mobile no. of 3 employee\n"
scanf ("%d %f %d", &e1.id, &e1.salary, &e1.mobile);
scanf ("%d%f %d", &e2.id, &e2.salary, &e2.mobile);
scanf ("%d %f %d", &e3.id, &e3.salary, &e3.mobile);
printf ("\n Entered Result ");
printf ("\n%d %f %d", e1.id, e1.salary, e1.mobile);
printf ("\n%d%f %d", e2.id, e2.salary, e2.mobile);
printf ("\n%d %f %d", e3.id, e3.salary, e3.mobile);
getch();
}

Next Topic Array Data Structure

← prev next →

Related Posts

DS Pointer
https://www.javatpoint.com/data-structure-structure 3/10
1/20/25, 8:53 PM Structure (Data Structures) - javatpoint

Pointer Pointer is used to points the address of the value stored anywhere in the computer
memory. To obtain the value stored at the location is known as dereferencing the pointer.
Pointer improves the performance for repetitive process such as: Traversing String Lookup
Tables Control Tables Tree Structures Pointer Details Pointer arithmetic:...

 8 min read

DS Introduction
An Introduction to Data Structures Since the invention of computers, people have been
using the term "Data" to refer to Computer Information, either transmitted or stored.
However, there is data that exists in order types as well. Data can be numbers or texts
written on a piece...

 20 min read

DS Tutorial
Data Structures Tutorial Data Structures (DS) tutorial provides basic and advanced
concepts of Data Structure. Our Data Structure tutorial is designed for beginners and
professionals. Data Structure is a way to store and organize data so that it can be used
efficiently. Our Data Structure tutorial includes all topics of...

 7 min read

DS Algorithm
What is an Algorithm? An algorithm is a process or a set of rules required to perform
calculations or some other problem-solving operations especially by a computer. The
formal definition of an algorithm is that it contains the finite set of instructions which are
being carried in...

 9 min read

Asymptotic Analysis
As we know that data structure is a way of organizing the data efficiently and that
efficiency is measured either in terms of time or space. So, the ideal data structure is a
https://www.javatpoint.com/data-structure-structure 4/10
1/20/25, 8:53 PM Structure (Data Structures) - javatpoint

structure that occupies the least possible time to perform all its operation and...

 9 min read

Learn Important Tutorial

Python Java

Javascript HTML

Database PHP

C++ React

B.Tech / MCA
https://www.javatpoint.com/data-structure-structure 5/10
1/20/25, 8:53 PM Structure (Data Structures) - javatpoint

Data
DBMS
Structures

Operating
DAA
System

Computer Compiler
Network Design

Computer Discrete
Organization Mathematics

Ethical Computer
Hacking Graphics

https://www.javatpoint.com/data-structure-structure 6/10
1/20/25, 8:53 PM Structure (Data Structures) - javatpoint

Web Software
Technology Engineering

Cyber
Automata
Security

C
C++
Programming

Java .Net

Python Programs

Control Data
System Warehouse
https://www.javatpoint.com/data-structure-structure 7/10
1/20/25, 8:53 PM Structure (Data Structures) - javatpoint

Preparation

Aptitude Reasoning

Verbal Interview
Ability Questions

Company
Questions

https://www.javatpoint.com/data-structure-structure 8/10
1/20/25, 8:53 PM Structure (Data Structures) - javatpoint

https://www.javatpoint.com/data-structure-structure 9/10
1/20/25, 8:53 PM Structure (Data Structures) - javatpoint

https://www.javatpoint.com/data-structure-structure 10/10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy