import stdio
import t, c


def type_bit_test() -> int:
    ti: t.CInt = 100
    ti32: t.CInt32T = 200
    tui32: t.CUInt32T = 300
    stdio.printf("type: CInt=%d CInt32T=%d CUInt32T=%d\n", ti, ti32, tui32)

    tl: t.CLong = 1000
    tll: t.CLongLong = 2000
    ti64: t.CInt64T = 3000
    tsize: t.CSizeT = 4000
    stdio.printf("type: CLong=%d CLongLong=%d CInt64T=%d CSizeT=%d\n", tl, tll, ti64, tsize)

    ba: int = 240
    bb: int = 15
    stdio.printf("bit: 240&15=%d\n", ba & bb)
    stdio.printf("bit: 240|15=%d\n", ba | bb)
    stdio.printf("bit: 240^15=%d\n", ba ^ bb)
    stdio.printf("bit: 240<<2=%d\n", ba << 2)
    stdio.printf("bit: 240>>2=%d\n", ba >> 2)
    stdio.printf("bit: 17%%5=%d\n", 17 % 5)

    return 0
