Answers for "swap two numbers using logical operators"

C
0

swapping of two numbers using bitwise operator

#include<stdio.h>

int main()
{
	int a, b;

	scanf("%d%d", &a, &b);

	//Write your code here
	a=a^b;
	b=a^b;
	a=a^b;
	printf("%d %d", a, b);
	
	return 0;
}
Posted by: Guest on June-01-2021

Code answers related to "swap two numbers using logical operators"

Code answers related to "C"

Browse Popular Code Answers by Language