Traversing an Array

The various operations that are performed on arrays are :

Traversing in array

This article explains about how to traverse in an array.

Traversing means to visit/to go/travel across each and every element of an array.



int main()
 int rank[5] = {10,20,30,13,15};
 int i;
 printf("\nThe elements of array are :");
 for(i=0; i<5; i++)
  printf("%d \t", rank[i]); 
return 0;



Fig 2 : Traversing an Array

Fig 2 : Traversing an Array

Short URL:
Author: Cusp2207 on March 19, 2014
Category: Algorithms, Computer Science, Data Structures

Leave a Reply

Last articles