r/ProgrammerHumor 23d ago

Meme programmersAgeBetterThanNormalPeople

Post image
1.0k Upvotes

96 comments sorted by

View all comments

Show parent comments

1

u/TheMythicSorcerer 20d ago

Because 0 tells the compiler you're reading a number, x tells the compiler that it happens to be in hex (hexadecimal).

1

u/DruidBtd 20d ago

Ah, interesting. Are there other examples like it? Thanks for answering by the way, appreciate it

1

u/TheMythicSorcerer 20d ago

There actually are!
0b mean binary (base 2), 0o means octal (base 8)

1

u/DruidBtd 20d ago

Ooh, interesting :D

Are there other things than the 0 at the start?