From bca9bc81ffcdbabc67965bf018247582cfca0187 Mon Sep 17 00:00:00 2001 From: Rama Shanker Singh <32456359+rama0804@users.noreply.github.com> Date: Wed, 3 Oct 2018 21:09:59 +0530 Subject: [PATCH] Create swap_two_vars_2.c --- swap_two_vars_2.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 swap_two_vars_2.c diff --git a/swap_two_vars_2.c b/swap_two_vars_2.c new file mode 100644 index 0000000..324c34f --- /dev/null +++ b/swap_two_vars_2.c @@ -0,0 +1,14 @@ +#include + +int main() +{ + int a,b; + printf("Enter the two elements \n"); + scanf("%d%d",&a,&b); + printf("Print the two numbers %d %d \n",a,b); + a=a^b; + b=a^b; + a=a^b; + printf("After Swapping %d %d",a,b); + return 0; +}