kernelthread.com

Linux (Sux?)

Introduction

A C program that does something amusing.

Source

Linux-only version:

main(){printf(&linux["\007\114%sux\013\0"],(linux)["friendly"]+"penguin"-0x6d);}

OS X-only version:

main(){printf(&__APPLE__["\007\114%sux\012\0"],(__APPLE__)["friendly"]+"penguin"-0x6d);}

Universal version:

int main(){return 6-printf(&(!printf|'&'-'%')["\177\114%sux\012\0"],(1&(int)main|1)["friendly"]+"penguin"-0x6d);}

Download

linux.c

osx.c

universal.c