⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 [

📁 奇怪程序
💻
字号:
原文件就这么一点: 
#include <stdio.h> 
main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_, 
main(-86,0,a+1)+a)):1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13? 
main(2,_+1,"%s %d %d\n"):9:16:t<0?t<-72?main(_,t, 
"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l+,/n{n+,/+#n+,/#\ 
;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l \ 
q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# \ 
){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' \ 
iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \ 
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')# \ 
}'+}##(!!/") 
:t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=='/')+t,_,a+1) 
:0<t?main(2,2,"%s"):*a=='/'||main(0,main(-61,*a, 
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);} 
运行结果太奇怪了: 
On the first day of Christmas my true love gave to me 
a partridge in a pear tree. 
On the second day of Christmas my true love gave to me 
two turtle doves 
and a partridge in a pear tree. 
On the third day of Christmas my true love gave to me 
three french hens, two turtle doves 
and a partridge in a pear tree. 
On the fourth day of Christmas my true love gave to me 
four calling birds, three french hens, two turtle doves 
and a partridge in a pear tree. 
On the fifth day of Christmas my true love gave to me 
five gold rings; 
four calling birds, three french hens, two turtle doves 
and a partridge in a pear tree. 
On the sixth day of Christmas my true love gave to me 
six geese a-laying, five gold rings; 
four calling birds, three french hens, two turtle doves 
and a partridge in a pear tree. 
On the seventh day of Christmas my true love gave to me 
seven swans a-swimming, 
six geese a-laying, five gold rings; 
four calling birds, three french hens, two turtle doves 
and a partridge in a pear tree. 
On the eigth day of Christmas my true love gave to me 
eight maids a-milking, seven swans a-swimming, 
six geese a-laying, five gold rings; 
four calling birds, three french hens, two turtle doves 
and a partridge in a pear tree. 
On the ninth day of Christmas my true love gave to me 
nine ladies dancing, eight maids a-milking, seven swans a-swimming, 
six geese a-laying, five gold rings; 
four calling birds, three french hens, two turtle doves 
and a partridge in a pear tree. 
On the tenth day of Christmas my true love gave to me 
ten lords a-leaping, 
nine ladies dancing, eight maids a-milking, seven swans a-swimming, 
six geese a-laying, five gold rings; 
four calling birds, three french hens, two turtle doves 
and a partridge in a pear tree. 
On the eleventh day of Christmas my true love gave to me 
eleven pipers piping, ten lords a-leaping, 
nine ladies dancing, eight maids a-milking, seven swans a-swimming, 
six geese a-laying, five gold rings; 
four calling birds, three french hens, two turtle doves 
and a partridge in a pear tree. 
On the twelfth day of Christmas my true love gave to me 
twelve drummers drumming, eleven pipers piping, ten lords a-leaping, 
nine ladies dancing, eight maids a-milking, seven swans a-swimming, 
six geese a-laying, five gold rings; 
four calling birds, three french hens, two turtle doves 
and a partridge in a pear tree. 
好像情诗 
不相信你自己可以编译下看看。别用vc6编译,有5个错误。我用 tc。


这个是 国际最看不懂最恶心的C 语言比赛IOCCC 的参赛程序。我这里还有很多。 
 

bluefire 2004-07-31 11:43 
呵呵 和爱情有关的 
 

ghohuo 2004-07-31 17:13 
第一次听说有这样的事情,还是韩大侠见识广! 
顺手贴了点上来。 
IOCCC — 国际看不懂的C程序大赛 



谁说我们编程序一定要遵循一定的编码规则?你是否使用过“匈牙利命名法”,“GNU coding style”,“Linux kernel coding style”。它们都说自己的方式好,别人的不好。但是看看 IOCCC 大赛的程序,你就知道最糟糕的编码规则也能写出很好的程序 :) 



大赛网址 



http://www.ioccc.org 



IOCCC 的大赛忠旨 



在遵守下面规则的前提下,写出最混乱,最让人看不明白的C程序。 
用讽刺的手法显示编程风格的重要性。 
用反常的代码加重编译器的负担。 
演示C语言的不让人注意的地方。 
为糟糕的C代码提供避难所。 


非常经典的C程序,ioccc从1984-2000每年的获奖程序全集http://www.xfocus.net/tools/200206/all.tgz 

 
 
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -