MIPI_BaseC_WebinarFRTK/04_Lecture04/15_bit operations_6_p33.c

14 lines
213 B
C
Raw Normal View History

2024-11-13 09:22:28 +03:00
#include <stdio.h>
#include <inttypes.h>
int main()
{
unsigned int a=5, b=7;
printf("a = %d, b = %d\n", a,b);
a = a^b;
b = a^b;
a = a^b;
printf("a = %d, b = %d", a,b);
// a = 7 b =5
}