Tuesday, July 14, 2009

Program to find the reverse of each value of array elements in c-language?

program to find the reverse of each value of array elements in c-language

Program to find the reverse of each value of array elements in c-language?
You mean reverse the ordering of elements in the array (e.g., (1, 2, 3) -%26gt; (3, 2, 1))?





If so, you'd iterate up to half the length of the array, and exchange array[i] with array[length - 1 - i]
Reply:The most efficient way to do a dictionary look-up of finding an element's location in an array is to maintain a hash table, although a binary search will do the job well enough for sorted arrays.
Reply:what kind of array? int? boolean?


what do you mean by reverse?


No comments:

Post a Comment