//reverse the array
#include <stdio.h>
void rev(int arr[],int size)
{
printf("reverse the array");
for(int i=size;i>=0;i--)
{
   printf("%d\n",arr[i]);
}
}
int main() {
   int n;
 int array[5]={10,1,2,3,5};
 for(int i=0;i<5;i++)
 {
printf("%d\n",array[i]);
 }
rev(array,5);
 
   return 0;
}

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post