Swapping of two numbers using Bit wise Operators in C language 00:59 by Let Us Code in C 0 Program: /* C Program for Swapping of two numbers using Bit wise Operators */ #include < stdio.h > void main( ) { int a, b; a = 10; b = 20; a = a ^ b; b = a ^ b; a = b ^ a; printf("\n a = %d\t b = %d", a, b); } Output: a = 20 b = 10 Share This: Fawitter Google+ Email ThisBlogThis!Share to XShare to Facebook
0 comments:
Post a Comment