added swap case in c