News: 0178555950

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Winners Announced in 2025's 'International Obfuscated C Code Competition' (ioccc.org)

(Monday August 04, 2025 @03:54AM (EditorDavid) from the clang-your-gong dept.)


Started in 1984, it's been described as the internet's longest-running contest. And yesterday 2025's International Obfuscated C Code Contest concluded — with [1]23 new winners announced in a [2]special four-and-a-half-hour livestreamed ceremony !

Programmers submitted their funniest programs showcasing C's unusual/obscure subtleties while having some fun. (And demonstrating the importance of clarity and style by setting some very bad examples...) Among this year's winners were an [3]OpenRISC 32-bit CPU emulator , a virtual machine capable of [4]running Doom , and some kind of [5]salmon recipe that makes clever use of C's [6]U"string" literal prefix ...

But yes, every entry's source code is ridiculously obfuscated. ("Before you set off on your adventure to decode this program's logic, make sure you have enough food, ammo, clothes, oxen, and programming supplies," read [7]the judge's remarks on the winner of this year's "diabolical logistics" prize. "You'll be driving for 2170 miles through a wild wilderness inspired by Oregon Trail...") And one entrant also struggled mightily in adapting a [8]rough port of their program's old Atari 2600 version , but was never gonna give it up...

Thanks to long-time Slashdot reader [9]achowe for bringing the news (who has submitted winning entries [10]in four different decades , starting in 1991 and continuing through 2024)...

Including a 2004 award for [11]the best abuse of the contest's guidelines . ("We are not exactly sure how many organisations will be upset with this entry, but we are considering starting an IOCCC standards body just to reign in the likes of Mr Howe....")



[1] https://www.ioccc.org/news.html

[2] https://www.youtube.com/live/UDzGwTalVAc?feature=shared

[3] https://www.ioccc.org/2024/macke/index.html

[4] https://www.ioccc.org/2024/kurdyukov3/index.html

[5] https://www.ioccc.org/2024/cable2/index.html

[6] https://en.cppreference.com/w/cpp/language/string_literal.html

[7] https://www.ioccc.org/2024/ferguson1/index.html

[8] https://www.ioccc.org/2024/weaver/index.html

[9] https://www.slashdot.org/~achowe

[10] https://www.ioccc.org/authors.html#Anthony_C_Howe

[11] https://www.ioccc.org/2004/hibachi/index.html



ROT13 (Score:2)

by RockDoctor ( 15477 )

Why isn't at least the headline ROT13-ed. That's about the lowest level of "obfuscation" I can think of.

Re: (Score:2)

by earthloop ( 449575 )

It was ROT13-ed twice for extra obscurity.

Commodore 64 made obfuscation fun (Score:4, Interesting)

by Tony Isaac ( 1301187 )

Using POKE, you could update the spelling of reserved words in its BASIC language.

For example:

REM THIS IS A REM STATEMENT WITH HIDDEN CODE

The REM ("remark" / comment) statement could actually be the altered spelling of, say, "FOR", and each word following could mean something completely different than what you would think.

Not very useful, but fascinating.

Re: (Score:2)

by registrations_suck ( 1075251 )

No wonder Apple outlasted Commodore with respect to relevancy in the modern world.

Re: (Score:2)

by registrations_suck ( 1075251 )

Everything.

I mean, absolutely EVERYTHING!

Re: (Score:2)

by Tony Isaac ( 1301187 )

In contrast with Apple, Commodore didn't gouge customers. Unfortunately, I'm guessing they kept their prices *too* low.

Re: (Score:3)

by ndsurvivor ( 891239 )

I think the point is that first a person has to be very proficient in coding, in order to do a clever obfuscation.

Salmon (Score:4, Interesting)

by ledow ( 319597 )

How the feck does that salmon one do that?

The output is nothing like the source code.

Re: (Score:2)

by test321 ( 8891681 )

This totally scary in the sense that the source code looks innocuous to a casual eye. (I won't execute obfuscated code on my machine for reasons, is the output listed somewhere?)

Re: (Score:1)

by NewID_of_Ami.One ( 9578152 )

Season salmon fillets with olive oil, lemon juice, garlic, salt, and pepper, then grill over medium heat for 4-6 minutes per side until flaky and cooked through.

Check it here: [1]https://www.onlinegdb.com/onli... [onlinegdb.com]

Just paste the code snippet from [2]https://github.com/ioccc-src/w... [github.com]

#include

unsigned int *salmon = U"is very yummy";

#define grill ;while(putchar(*salmon++))

#undef grill

#define grill

#undef grill

int main() {

for (int i = 1; i = 10; i++) {

printf("%d * %d

[1] https://www.onlinegdb.com/online_c_compiler

[2] https://github.com/ioccc-src/winner/blob/master/2024/cable2/prog.c

Re: (Score:1)

by NewID_of_Ami.One ( 9578152 )

* Paste from github, not the snippet i pasted here as slashdot eats up some stuff

Re: (Score:2)

by Spazmania ( 174582 )

The C code itself isn't obfuscated. The problem is that your text editor isn't showing you the code.

If you look at the C code in a plain ASCII text editor, you'll see everything. But a text editor that interprets UTF-8 hides a bunch of stuff from you.

If you happen to be viewing the entry in VIM, use ":set encoding=latin1" to see what's really going on.

Re: (Score:2)

by test321 ( 8891681 )

I think the code is still obfuscated at because you'd think the for loop would execute, and it does not, and this is due to due to a clever C trick (that it inserts a while() that takes the following for() as code block). Though it's not the main point of the feat.

Re: (Score:2)

by ledow ( 319597 )

The worrying thing is that both cat and nano (and presumably many other editors), by default, do not display the text that is present there...

That could cause merry hell for hiding things in copypasta, configuration scripts, logs, etc.

Re: (Score:2)

by test321 ( 8891681 )

I think we should get a warning in gcc (and other compilers), or in automated integration workflow, if U32 characters are present in any other file than localisations.

Re: (Score:3)

by Tapewolf ( 1639955 )

A while back someone posted a (now-deleted) comment on the Fediverse about how they were able to construct a single unicode glyph of arbitrary length, e.g. a single character that could require 2MB of data to store.

The salmon code appears to be doing something similar - if you look at the source code in a hex editor, you'll see that the four spaces before "is very yummy" are actually a huge stream of F3,A0,81,93 and so on, where '93' is a varying number that may contain the actual payload (a recipe for cook

Re: (Score:2)

by Spazmania ( 174582 )

It's not a true C obfuscation, it's a Unicode hack. The compiler treats the code as a series of bytes but your text editor sees UTF-8. The code which actually executes is hiding there.

Re: (Score:3)

by hcs_$reboot ( 1536101 )

Once translated by the compiler (thanks to the `U`) the `salmon` bytes are a bunch of UTF-32 mostly invisible chars that represent the text shown when run (each LSB of the 32-bits integers are the actual characters).

The rest of the code is pretty explicit when special invisible characters are shown in hexa after the added char `^` for clarity

#define grill^f3^a0^81^81 ;while(putchar(*salmon++))

#undef grill

#define ^f3^a0^81^81 grill^f3^a0^81^81

#undef grill

int main() {^f3^a0^81^81 ^f3^a0^81^81

Such a shame (Score:3)

by fatwilbur ( 1098563 )

As of posting this story has 6 comments on a site made for nerds - historically those specific to the software development realm. Maybe I’ll urge them to include more references to Trump in their rules/results to generate interest from the crowd here next year.

I love this contest and reading through the entries every year. Without even planning to I get caught up in an entire day reading the entry source, remarks, and even the rules. They are often a true combination of wit, humor, and ingenuity. Kudos to the submitter here - best abuse of the rules/guidelines is a favourite category and I just fucking love it. This is truly a story for nerds yet such a shame it is basically ignored and not discussed on this site anymore. Not to be part of the shit brigade here, I’m going to spend my Sunday evening reading these entries and will post something back I find amusing.

Re: (Score:3)

by hcs_$reboot ( 1536101 )

> ll urge them to include more references to Trump in their rules/results

Why? Because of His obfuscated policies?

Re: (Score:2)

by ndsurvivor ( 891239 )

Respect.

Spoiler (Score:2)

by TranquilVoid ( 2444228 )

Spoiler: all winning entries this year were just snippets of Github Copilot generations.

Save the bales!