英文解释这段代码? [英] English interpretation of this code?

查看:86
本文介绍了英文解释这段代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码编译并顺利运行。任何人都可以至少向我解释一下它前几行的做法是什么吗?谢谢。


这里是代码:


#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#''lq#''+ d''K#!/ \

+ k#; q#''r} eKK#} w''r} eKK {nl]''/#;#q#n''){)#} w''){} {nl]''/ + #n''; d} rw''i; #){n \

l]!/ 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(a [31]):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);}

解决方案

" genus_" <き**** @ gmail.com>在消息中写道

news:11 ********************* @ g44g2000cwa.googlegro ups.com ...

以下代码编译并运行顺利。任何人至少可以向我解释它在前几行中做了什么吗?谢谢。
这里是代码:
#include< stdio.h>
main(t,_,a)
char * a;
{return!0< t?t< 3?main(-79,-13,a + main(-87,1 -_,




为什么不''你自己解决国际混淆的比赛c代码吗?


Alex


" genus_"< ki **** @ gmail.com>写道:

下面的代码编译并运行顺利。任何人都可以至少向我解释它对前几行的影响?


当然,没问题。


这里是代码:

#include< stdio .h>


此行导入执行I / O的标准标题,例如

''printf''。



这一行是一个空白的分隔线,没有任何效果,

几乎肯定会有助于提高可读性。


main( t,_,a)


此行开始定义函数' 'main'',带有

三个参数。省略返回类型意味着

返回类型默认为''int''(在C89 / C90下允许)。


char * a;


此行声明参数''a''(使用旧的K& R-style

参数声明语法)以使类型''char *' '。


{return!0< t?t< 3?main(-79,-13,a + main(-87,1-_,

这一行开始函数定义并给出''return''语句的开头

确定''main'的

值'功能。

[......在前几行剪断后行...]谢谢。




别提它。


C:\> obfuscated.exe

圣诞节的第一天,我的真爱给了我
梨树上的
a鹧。


圣诞节的第二天,我的真爱给了我

两只乌龟鸽子

和梨树上的鹧。


圣诞节的第三天,我的真爱给了我

三只法国母鸡,两只斑鸠

在一棵梨树上鹧..


在圣诞节的第四天,我的真爱给了我

四只叫鸟,三只法国母鸡,两只乌龟鸽子

和梨树上的鹧。


圣诞节的第五天,我的真爱给了我

五金戒指;

四只叫鸟,三只法国母鸡,两只乌龟鸽子

和一棵梨树上的鹧..


在圣诞节的第六天,我的真爱给了我

六只鹅,五只金戒指;

四只叫鸟,三只法国母鸡,两只乌龟鸽子< br $> b $ b和梨树上的鹧。


圣诞节的第七天,我的真爱给了我

七天鹅一个-swimming,

六只鹅,五只金戒指;

四只叫鸟,三只法国母鸡,两只乌龟鸽子

和一只梨树上的鹧。


圣诞节的第八天,我的真爱给了我

八个女佣a-milking,七个天鹅一个游泳,

六个鹅一个铺设,五个金戒指;

四个叫鸟,三个法国母鸡,两只乌龟鸽子

和一棵梨树上的鹧。


圣诞节的第九天,我的真爱给了我

九个女士跳舞,八个女佣一个挤奶,七个天鹅一个游泳,

六个鹅一个铺设,五个金戒指;

四个叫鸟,三个法国母鸡,两只乌龟鸽子

和一棵梨树上的鹧。


圣诞节的第十天,我的真爱给了我

十位领主a-leaping,

九位女士跳舞,八位女佣一次挤奶,七位天鹅一起游泳,

六只鹅,五枚金戒指;

四只叫鸟,三只法国母鸡,两只乌龟鸽子

和一棵梨树上的鹧。


第十一圣诞节那天,我的真爱给了我

11个风笛管道,10个领主a-leaping,

九个女士跳舞,八个女佣一个挤奶,七个天鹅一个游泳,

六个鹅一个铺设,五个金戒指;

四个叫鸟,三个法国母鸡,两只乌龟鸽子

和一棵梨树上的鹧。


在圣诞节的第十二天,我的真爱给了我

十二个鼓手打鼓,十一个风笛管道,十个领主a-leaping,

九个女士跳舞,八个女佣一个挤奶,七个天鹅一个游泳,

六个鹅一个 - 五个金戒指;

四只叫鸟,三只法国母鸡,两只乌龟鸽子

和一棵梨树上的鹧.......


The below code compiles and runs smoothly. Can any one at least explain
to me what its doing for first few lines? Thank you.

Here''s the code:

#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;# ){n\
l]!/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(a[31]):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);}

解决方案

"genus_" <ki****@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...

The below code compiles and runs smoothly. Can any one at least explain
to me what its doing for first few lines? Thank you.
Here''s the code:
#include <stdio.h>
main(t,_,a)
char *a;
{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,



Why don''t you solve the international obfuscated contest c code yourself?

Alex


"genus_" <ki****@gmail.com> writes:

The below code compiles and runs smoothly. Can any one at least explain
to me what its doing for first few lines?
Sure, no problem.

Here''s the code:

#include <stdio.h>
This line imports a standard header for doing I/O such as
''printf''.


This line is a blank separating line, having no effect,
almost certainly put in to aid readability.

main(t,_,a)
This line starts the definition of the function ''main'', with
three parameters. The omission of a return type means the
return type defaults to ''int'' (allowed under C89/C90).

char *a;
This line declares parameter ''a'' (using the old K&R-style
parameter declaration syntax) to have type ''char *''.

{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
This line commences the function definition and gives the
beginning of the ''return'' statement that determines the
value of the ''main'' function.
[...lines after the first few lines snipped...] Thank you.



Don''t mention it.


C:\>obfuscated.exe
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 eighth 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.


这篇关于英文解释这段代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆