RVBTCC/test/operator/assign.c

28 lines
462 B
C
Raw Normal View History

2024-12-24 07:00:51 +00:00
int printf(char* format, ...);
int main() {
int a = 5;
int b = 4;
a += b;
printf("%d\n", a);
a -= b;
printf("%d\n", a);
a *= b;
printf("%d\n", a);
a /= b;
printf("%d\n", a);
a %= b;
printf("%d\n", a);
a &= b;
printf("%d\n", a);
a |= b;
printf("%d\n", a);
a ^= b;
printf("%d\n", a);
a = b;
printf("%d\n", a);
a <<= b;
printf("%d\n", a);
a >>= b;
printf("%d\n", a);
}