Hi, im writing a c program for uni and my brief is quite restrictive.. basically i have to take int values held in an array from subscripts 'm' and 'n' (defined when the program is run) and print them in order using a recursive function (fine, easy).
Problem comes when i have to print them backwards using the same function but only by interchanging the position of two statements, i can't add / change any code which is annoying me a bit...
So, i thought if i could take the value(s) from the array and instead of printing it straight from it, place it in an integer to manipulate it there might be a bit easier..
anyway, basically i need to know how to take
array [1][2][3][4]
and change it to
int 1234 (or even if u can!)
thank u, and any other ideas would be nice cos this is annoying me as i thought it would be straight forward.. :/
Problem comes when i have to print them backwards using the same function but only by interchanging the position of two statements, i can't add / change any code which is annoying me a bit...
So, i thought if i could take the value(s) from the array and instead of printing it straight from it, place it in an integer to manipulate it there might be a bit easier..
anyway, basically i need to know how to take
array [1][2][3][4]
and change it to
int 1234 (or even if u can!)
thank u, and any other ideas would be nice cos this is annoying me as i thought it would be straight forward.. :/