How can one Implement a function in C that takes an array of integers,%26amp; and reverses the order of items in the
The function you implement must have the following form:
void reverse_order(int array[], int n)
{
/* your code goes here: re-order the n items in the array so that the
first one becomes the last
* * and the last one first.
*/
}
You should then implement a main() function which reads in a set of integers into an array,
reverses the order of the number (using the function you have just defined) and prints them out
again.
For example, when complete and compiled, you should be able to run your program, and enter
the numbers:
2 4 5 11 23 1 4
then program will then print out:
4 1 23 11 5 4 2
make sure your program will allow the user enter the numbers and then gives the output as their reverse
Hey guys n gals need someone good in c to take on this one will send u my feedback after ur result thanks?
do your own homework. this is actually a very easy exercise - a simple loop is all that is needed.
nobile
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment