relocation in 1D array in C

July 11, 2011 at 02:38:19
Specs: Windows XP
Hello frnds! I want to know how to move an element of an array to another address within the same array. Suppose the array has elements like [1 2 3 4]. The expected o/p is [4 1 2 3]. No swapping is to be done & we hav to work with only a single array. We cant copy few elements in some other array or anything like that.
Unable to get solution. Pls give some suggestions.

See More: relocation in 1D array in C

Report •


#1
July 11, 2011 at 02:46:54
"I want to know how to move an element of an array to another address within the same array."

"No swapping is to be done"

Impossible. Moving the elements of the array implies that you are swapping them around. Of course, if you just want to print them in a different order that's trivial.


Report •
Related Solutions


Ask Question