愚蠢的问题 [英] Stupid question
问题描述
大家好!
有谁能解释一下这个程序?
我真的很困惑。
提前thx。 br />
Laszlo Kis-Adam
< df ****** @ freemail.hu>
" ;
#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 +,/#{1 +,/ 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 \
''我;#){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#瓦特! 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);}
"
Hi everyone!
Can anyone explain me this program?
I''m getting really confused.
thx in advance.
Laszlo Kis-Adam
<df******@freemail.hu>
"
#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);}
"
推荐答案
Leslie Kis-Adam说:
Leslie Kis-Adam said:
大家好!
有人能解释一下这个程序吗?
我真的很困惑。
#include< stdio.h>
main(t,_,a)char * a;
Hi everyone!
Can anyone explain me this program?
I''m getting really confused.
#include <stdio.h>
main(t,_,a)char *a;
这实际上非常简单。由于main需要采用no或者两个
参数,这个程序(其中main取/三/参数)不符合
遵守规则C,所以它的行为是不确定的。它可能会完成
任何事情。
-
Richard Heathfield
" Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk
电子邮件:rjh在上述域名, - www。
It''s actually very simple. Since main is required to take either no, or two,
parameters, this program (in which main takes /three/ parameters) doesn''t
obey the rules of C, and so its behaviour is undefined. It might do
anything at all.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Richard Heathfield< rj*@see.sig.invalidwrites :
Richard Heathfield <rj*@see.sig.invalidwrites:
Leslie Kis-Adam说:
Leslie Kis-Adam said:
>大家好!
任何人都可以向我解释这个程序?
我真的很困惑。
#include< stdio.h>
main(t,_,a)char * a;
>Hi everyone!
Can anyone explain me this program?
I''m getting really confused.
#include <stdio.h>
main(t,_,a)char *a;
实际上非常简单。由于main需要采用no或者两个
参数,这个程序(其中main取/三/参数)不符合
遵守规则C,所以它的行为是不确定的。它可能会做任何事情。
。
It''s actually very simple. Since main is required to take either no, or two,
parameters, this program (in which main takes /three/ parameters) doesn''t
obey the rules of C, and so its behaviour is undefined. It might do
anything at all.
假设程序是针对托管实现的,那么
将这种形式的main()记录为扩展名。 br />
-
Keith Thompson(The_Other_Keith) ks *** @ mib。 org < http://www.ghoti.net/~kst>
圣地亚哥超级计算机中心< *< http://users.sdsc.edu/~kst>
我们必须做点什么。这是事情。因此,我们必须这样做。
Assuming that the program is for a hosted implementation that doesn''t
document this form of main() as an extension.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Leslie-and-or-Lazlo Kis-Adam写道:
Leslie-and-or-Lazlo Kis-Adam wrote:
有人能解释一下这个程序吗?
(snip混淆源代码)
Can anyone explain me this program?
(snip obfuscated source code)
看起来像是一个条目混淆的C竞赛。 (谷歌,如果你不知道它是什么,那就是
。)
Looks like an entry to the "Obfuscated C Contest". (Google that
if you don''t know what it is.)
我真的很困惑。
I''m getting really confused.
混淆是整个想法。你并不认为C
程序员实际上在工作中编写这样的代码,是吗?
(嗯,我的某位前任同事)谁曾经写过
代码ALMOST混淆了......但他被解雇了,而且
正确如此。)
如果你真的,真的想要对这种野兽进行治疗,我很害怕,你将不得不纠缠其他人给你一个人;我这时候不会以这种方式折磨我的大脑。我确实编程了
编程,而不是拆除编程。
Obfuscation is the whole idea. You didn''t think that C
programmers actually write code like that on the job, did you?
(Well, there''s a certain ex-coworker of mine who used to write
code ALMOST that obfuscated... but he got fired for it, and
rightly so.)
If you really, really want a disection of this beast, I''m afraid
you''ll have to pester someone else here into giving you one; I
don''t torture my brain that way these days. I do structured
programming, not demolished programming.
thx提前。
thx in advance.
回想起来,欢迎你。
欢呼,
Robbie Hatley < b / b
孤独的狼inj在pac bell dot net
(将[usenet]置于旁路垃圾邮件过滤器中。)
You''re welcome, in retrospect.
Cheers,
Robbie Hatley
lone wolf intj at pac bell dot net
(Put "[usenet]" in subject to bypass spam filter.)
这篇关于愚蠢的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!