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 Related Posts:C language Operators and Expressions Tutorials Operators: The symbol is used to perform an operation is called an operator. -->… Read MoreC Language Files Tutorials Files --> A file is a defined data type used as data structure. A file is known as a string. … Read MoreC Program to read array of elements and print only even numbers Program: #include< stdio.h > #include< conio.h > void main( ) { &nbs… Read MoreC Program to read array of elements and print only odd numbers Program: #include< stdio.h > #include< conio.h > void main( ) { … Read MoreC language Pointers Tutorials Pointers Pointer is a variable which stores address of another variable. --> … Read More
0 comments:
Post a Comment