Skip to Main Content
Data Structures Using C, 2nd Edition by Pearson
book

Data Structures Using C, 2nd Edition by Pearson

by A. K. Sharma
May 2024
Intermediate to advanced content levelIntermediate to advanced
521 pages
14h 12m
English
Pearson India
Content preview from Data Structures Using C, 2nd Edition by Pearson
Arrays: Searching and Sorting 105
Consider a list of characters, represented using an array called charList as shown in
Figure 3.6. Suppose it is desired to insert a character ‘D’ at its proper place in charList, i.e., at the
3rd location.
Now to accommodate the character ‘D’, the characters ‘G’, ‘F’, and ‘E’ will have to be shifted one step
towards right to locations 6th, 5th, and 4th, respectively as per the operations shown below:
charList [6] 5 charList[5];
charList [5]
5 charList[4];
charList [4]
5 charList[3];
Once the above copying operation is over, charList [3] becomes available for the storage of incom-
ing character ‘D’ as shown ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Structures Using C

Data Structures Using C

Samir Kumar Bandyopadhyay, Kashi Nath Dey
Intermediate C Programming, 2nd Edition

Intermediate C Programming, 2nd Edition

Yung-Hsiang Lu, George K. Thiruvathukal

Publisher Resources

ISBN: 9781299831582