MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / main

Function main

tests/ImplicitCastHandler2Test.cpp:3–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected