Question #261552

Write a program/method to swap two neighboring numbers in an array when the first index is given



Expert's answer

 Swap() {
Int temp;
Int[] arr;
temp=arr[i] ;
arr[i] =arr[i+1];
arr[i+1]=temp;
} 
LATEST TUTORIALS
APPROVED BY CLIENTS