IDOL Institute of Distance and Online Learning ENHANCE YOUR QUALIFICATION, ADVANCE YOUR CAREER.
2 Arrays & Structures : 1. Introduction 2. Operations on Arrays. www.cuidol.in Unit-1(MAP-607) All right are reserved with CU-IDOL
ARRAY 3 An array is a data structure for storing more than one data item that has a similar data type. The items of an array are allocated at adjacent memory locations. These memory locations are called elements of that array. www.cuidol.in Unit-1(MAP-607) All right are reserved with CU-IDOL
4 Important Points •Element − Each item stored in an array is called an element. •Index − Each location of an element in an array has a numerical index, which is used to identify the element. •Array name: necessary for easy reference to the collection of elements •Data Type: necessary for type checking and data integrity www.cuidol.in Unit-1(MAP-607) All right are reserved with CU-IDOL
5 Array Unit-1(MAP-607) All right are reserved with CU-IDOL Representation •Index starts with 0. •Array length is 10 which means it can store 10 elements. •Each element can be accessed via its index. www.cuidol.in
Basic Operations 6 •Traverse − print all the array elements one by one. •Insertion − Adds an element at the given index. •Deletion − Deletes an element at the given index. •Search − Searches an element using the given index or by the value. •Update − Updates an element at the given index. www.cuidol.in Unit-1(MAP-607) All right are reserved with CU-IDOL
Traverse Operation 7 OUTPUT www.cuidol.in Unit-1(MAP-607) All right are reserved with CU-IDOL
Insertion Operation 8 OUTPUT www.cuidol.in Unit-1(MAP-607) All right are reserved with CU-IDOL
Deletion Operation 9 OUTPUT www.cuidol.in Unit-1(MAP-607) All right are reserved with CU-IDOL
Search Operation 10 www.cuidol.in Unit-1(MAP-607) All right are reserved with CU-IDOL
Update Operation 11 www.cuidol.in Unit-1(MAP-607) All right are reserved with CU-IDOL
REFERENCES 12 1. Text Books: •T1 Schaum's Outlines Series- Data Structures, Seymour Lipschutz, TMH. •T2 E. Balagarusamy, Data Structure using C/C++, Tata McGraw-Hill Education. 1. Reference Books: •R1 Trembley&Soreson, Introduction to Data Structures Applications, Second Edition, Pearson Education. •R2 A. Tannenbaum, Y. Lanhgsam and A.J. Augenstein, Data Structures Using C++, Prentice Hall of India. www.cuidol.in Unit-1(MAP-607) All right are reserved with CU-IDOL
13 THANK YOU www.cuidol.in Unit-1(MAP-607) All right are reserved with CU-IDOL
Search
Read the Text Version
- 1 - 13
Pages: