Question #274866

Write a pseudo code for Swap the contents of two variables using a third variable.

Expert's answer

int swap(int &a, int &b) {
  int c;
  c=a;
  a=b;
  b=c;
}
LATEST TUTORIALS
APPROVED BY CLIENTS