AmZetta interview question

Write a program for Bit swap with given positions.