Swap Two Variable's using Third Variable in C

#include <stdio.h>


int a, b, temp;
printf(" Enter any two numbers: ");
scanf("%d %d", &a, &b);

printf(" Before Swapping: ");
printf(" a = %d ", a);
printf(" b = %d ", b);


temp = a;
a = b;
b = temp;


printf(" After Swapping: ");
printf(" a = %d ", a);
printf(" b = %d ", b);




Upload Content

Upload your original content. We will publish your material under your name on W3Professors after review.


Without your feedback, such words as Improvement, Achievement and Success have no meaning for us.

W3Professors is only to provide online education. We do not warrant oraginality of any content. Whole content is uploaded by someone so if you feel that particular content is copied or not upto mark. You can click on Copied Content link. We will remove that content Immediately. You agree to have read and accept our Terms of Use and Privacy Policy. © Copyright 2008-2015 W3Professors.Com All Rights Reserved.

Designed and Maintained by Kanwer Technologies