By Yogesh Neopaney Assistant Professor Department of Computer Science

Slides:



Advertisements
Similar presentations
Data Structures Through C
Advertisements

Data Structures Static and Dynamic.
Lecture - 1 on Data Structures. Prepared by, Jesmin Akhter, Lecturer, IIT,JU Data Type and Data Structure Data type Set of possible values for variables.
Midterm 2 Overview Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
CS 104 Introduction to Computer Science and Graphics Problems Data Structure & Algorithms (4) Data Structures 11/18/2008 Yang Song.
© The McGraw-Hill Companies, 2006 Chapter 5 Arrays.
Rossella Lau Lecture 1, DCO20105, Semester A, DCO Data structures and algorithms  Lecture 1: Introduction What this course is about:  Data.
C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure.
Lecture No.01 Data Structures Dr. Sohail Aslam
Data Structures Week 5 Further Data Structures The story so far  We understand the notion of an abstract data type.  Saw some fundamental operations.
Dr. Engr. Sami ur Rahman Assistant Professor Department of Computer Science University of Malakand Data Structure: Introduction.
Chapter 2 ARRAYS.
Introduction to Arrays in Java Corresponds with Chapter 6 of textbook.
Prepared By Ms.R.K.Dharme Head Computer Department.
 DATA STRUCTURE DATA STRUCTURE  DATA STRUCTURE OPERATIONS DATA STRUCTURE OPERATIONS  BIG-O NOTATION BIG-O NOTATION  TYPES OF DATA STRUCTURE TYPES.
A first look an ADTs Solving a problem involves processing data, and an important part of the solution is the careful organization of the data In order.
Data Structures and Algorithms Lecture 1 Instructor: Quratulain Date: 1 st Sep, 2009.
Chapter 8 Arrays Instructor: Kun-Mao Chao ( 台大資工 趙坤茂 )
Elementary Data Organization. Outline  Data, Entity and Information  Primitive data types  Non primitive data Types  Data structure  Definition 
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 240 Elementary Data Structures Array Lists Array Lists Dale.
Arrays. Topics to be Covered... Arrays ◦ Declaration ◦ Assigning values ◦ Array manipulation using loops Multi-dimensional arrays ◦ 2D arrays ◦ Declaration.
Data Structure and Algorithms
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To introduce the basic concepts of linked lists ❏ To introduce the basic concepts.
ARRAYS IN C/C++ (1-Dimensional & 2-Dimensional) Introduction 1-D 2-D Applications Operations Limitations Conclusion Bibliography.
Fig Storage of a C program. Fig Memory allocation with malloc.
Arrays Department of Computer Science. C provides a derived data type known as ARRAYS that is used when large amounts of data has to be processed. “ an.
3/19/2016 5:40 PMLinked list1 Array-based List v.s. Linked List Yumei Huo Department of Computer Science College of Staten Island, CUNY Spring 2009.
UNIT-II Topics to be covered Singly linked list Circular linked list
Linked List ADT used to store information in a list
Data Structure By Amee Trivedi.
Chapter 12 – Data Structures
Course Developer/Writer: A. J. Ikuomola
CSCI-255 LinkedList.
UNIT – I Linked Lists.
Linked Lists Chapter 6 Section 6.4 – 6.6
Data Structure Interview Question and Answers
BASIC ELEMENTS OF A COMPUTER PROGRAM
Lecture 7 Arrays 1. Concept of arrays Array and pointers
Array, Strings and Vectors
Data Structure and Algorithms
Program to search an element of array using linear search.
Data Structures Data Structure is a way of collecting and organising data in such a way that we can perform operations on these data in an effective.
Data Structures Interview / VIVA Questions and Answers
Chapter 7: Array.
Data Structure Interview
Introduction to Data Structure
Map interface Empty() - return true if the map is empty; else return false Size() - return the number of elements in the map Find(key) - if there is an.
MIS Professor Sandvig MIS 324 Professor Sandvig
Trees and Binary Trees.
Chapter 15 Lists Objectives
Linked Lists Chapter 10.
DATA STRUCTURE QUEUE.
Arrays and Linked Lists
Further Data Structures
Introduction To Programming Information Technology , 1’st Semester
Priority Queues (Chapter 6.6):
Cs212: Data Structures Computer Science Department Lecture 2: Arrays.
Indirection.
Data structures and algorithms
Binary Trees: Motivation
Chapter 11 Data Structures 1.
MIS Professor Sandvig MIS 324 Professor Sandvig
Single-Dimensional Arrays chapter6
Introduction to Data Structure
Data Structures & Algorithms
Multi-Dimensional Arrays
Introduction to data structures
Array operations Dr. T. Kokilavani Assistant Professor
Introduction to data structures
Presented by : Aman Gupta PGT CS KV No.1, Narimedu, Madurai
Presentation transcript:

By Yogesh Neopaney Assistant Professor Department of Computer Science Array By Yogesh Neopaney Assistant Professor Department of Computer Science

An Array is a user-defined data type that stores related information together. All the information stored in an array belongs to the same data type.

Declaration of Arrays 3 things are needed before declaring an array Data type- The kind of the values it can store, example int, char, float, double. Name – The name of an array. Size- The maximum number of values that the array can hold.

Syntax for Declaring an array Data_Type Name [Size]; Example- Int marks[10]; The array will be stored as shown below:- 1st Element 2nd Element 3rd Element 4th Element 5th Element 6th Element 7th Element 8th Element 9th Element 10th Element

Storing Values in an Array Initialize the Elements during declaration. Input Values for the elements from the keyboard. 3. Assign values to Individual

Operation on Arrays Traversing an array Inserting an Element in an array Searching an element in an array Deleting an element in an array Merging two arrays Sorting an array in ascending or descending order.

Advantages and Disadvantages of an array It is used to represent multiple data items of same type by using only single name. It can be used to implement other data structures like linked lists, stacks, queues, trees, graphs etc. 2D arrays are used to represent matrices.

Disadvantages We must know in advance that how many elements are to be stored in an array. Array is static structure. It means that array is of fixed size. Since array is of fixed size, if we allocate more memory than requirement then the memory space will be wasted and if we allocate less memory than requirement, then it will create problem.

Thank You