DS - Traversing Linear Array.
Traversing Linear Array. Accessing each record exactly once. Traversing is a simplpe process which is helpfull to print each record/element of data structure. From the below algorithm we can understand the logic of traversing of linear array. Algorithm for traversing Linear Array. Repeat for i=LB to UB. apply PROCESS to LA[i] [end of for loop] Exit. From the above algorithm it is very easy to understand the logic of traversing in stepwise manner. As we can see in the first step we have described the logic of for loop where loop will visit each element of array from first position till the last location. After the loop statement we have used preocess(for ex., printf) which will access and display each array element of LA i.e., linear array. Loop will end here. Finally Exit which shows completion. On the basis of same algorithm we can create program as per our requirement.