| 1 | #include <cstdio> |
| 2 | |
| 3 | int main() |
| 4 | { |
| 5 | unsigned int a = 5; |
| 6 | unsigned int b = 4; |
| 7 | |
| 8 | printf("a %% b: %d %% %d = %d\n", a, b, (a%b)); |
| 9 | |
| 10 | signed int c = -5; |
| 11 | signed int d = 4; |
| 12 | |
| 13 | printf("c %% d: %d %% %d = %d\n", c, d, (c%d)); |
| 14 | |
| 15 | signed int e = 5; |
| 16 | signed int f = -4; |
| 17 | |
| 18 | printf("e %% f: %d %% %d = %d\n", e, f, (e%f)); |
| 19 | |
| 20 | signed char g = -5; |
| 21 | unsigned char h = 4; |
| 22 | |
| 23 | printf("g %% h: %d %% %d = %d\n", g, h, (g%h)); |
| 24 | |
| 25 | |
| 26 | signed int i = -5; |
| 27 | unsigned int j = 4; |
| 28 | |
| 29 | printf("i %% j: %d %% %d = %d\n", i, j, (i%j)); |
| 30 | printf("i %% j: %#x %% %#x = %#x\n", i, j, (i%j)); |
| 31 | } |
nothing calls this directly
no outgoing calls
no test coverage detected