Operations On Array:
We can can perform following operations on array:
- Traversal - Printing Elements of array.
- Insertion - Adds an element at a given index.
- Deletion - deletes an element at a given index.
- Searching - Searches an element using a given index or by value.
We can also perform other operations like Sorting in Ascending and Descending Order.
Let's look into these individually.
Traversing:
Visiting or Printing every element of array is known as Traversing.
Now the question arises why traversal?
To store elements or print elements.
An array can easily be traversed using for loop in C.
- Start a loop from 0 to N-1, where N is the Size of array.
- Access every element of array with help of
- Print the elements
This was all for now.
In next post we will discuss about Insertion, Deletion and Searching in an array.
nice buddy...
ReplyDeleteNice.....
ReplyDeleteAur kesa ho??
Astounding ladle👍
ReplyDeleteNice 🙂
ReplyDelete