English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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

2007-08-20 15:25:12 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

4 answers

You mean reverse the ordering of elements in the array (e.g., (1, 2, 3) -> (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]

2007-08-20 15:36:10 · answer #1 · answered by McFate 7 · 0 0

1

2017-01-19 04:13:08 · answer #2 · answered by ? 3 · 0 0

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.

2007-08-20 15:37:59 · answer #3 · answered by samuraileumas 2 · 1 0

what kind of array? int? boolean?
what do you mean by reverse?

2007-08-20 15:33:18 · answer #4 · answered by peng w 2 · 0 0

fedest.com, questions and answers