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:Explain about Towers of Hanoi with Program, Towers of Hanoi Problem Towers of Hanoi: &nbs… Read MoreC Program that Calculates the area of a square by giving length of the side from the user Program: #include<stdio.h> #include<conio.h> void main( ) { … Read MoreC Program that calculates the Volume of the Sphere Program: #include<stdio.h> #include<conio.h> #define pi 3.14 void main( ) { … Read MoreWrite a program to read two numbers from the user and find highest number Program: #include<stdio.h> #include<conio.h> void main( ) { … Read MoreWrite a program to read three numbers from the user and find the highest number Program: #include<stdio.h> #include<conio.h> void main( ) { … Read More
0 comments:
Post a Comment