Lesson 4 of 18

Integer Types

Integer Types

HolyC has explicit integer types that encode both signedness and size. Every type name is capitalized.

Signed Integer Types

TypeSizeRange
I88-bit−128 to 127
I1616-bit−32,768 to 32,767
I3232-bit−2,147,483,648 to 2,147,483,647
I6464-bit−9.2 × 10¹⁸ to 9.2 × 10¹⁸

Unsigned Integer Types

TypeSizeRange
U88-bit0 to 255
U1616-bit0 to 65,535
U3232-bit0 to 4,294,967,295
U6464-bit0 to 1.8 × 10¹⁹

Declaring Variables

I64 population = 8000000000;
I32 year = 2024;
I8 small = 127;
U8 byte_val = 255;

Arithmetic

All standard arithmetic operators work as in C: +, -, *, /, %.

HolyC also has the exponentiation operator **:

I64 squared = 5 ** 2;  // 25
I64 cubed   = 3 ** 3;  // 27

Your Task

Declare an I64 variable a = 12 and an I64 variable b = 5. Print the result of a * b on one line.

Expected output: 60

Aiwnios HolyC loading...
Loading...
Click "Run" to execute your code.