/* a is the integer array and n is the size of the array */
void revIntArray(int a[], int n)
{
int i;
for(i=0;i< n/2;i++){
intSwap( &a[i], &a[n-i-1]);
}
}
//intSwap is the swap function to swap two integers
Thursday, September 4, 2008
C pseudo code to reverse an integer array
Posted by Nanya at 7:32 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment