如何理解这一行? [英] How to understand this line of c ?
问题描述
main(_){for(--_; putchar(_ ++ [" J!Mpwf!Zpv \ 1"] - 1););}
" lnzju" < GE ******* @ gmail.com>在消息中写道
news:11 ********************** @ g43g2000cwa.googlegr oups.com ...main(_){for(--_; putchar(_ ++ [" J!Mpwf!Zpv \ 1"] - 1););}
不要。这是垃圾。
-
Ivan Budiselic
ICQ#104044323
IRC:buda @# gamer.hr@quakenet
删除''删除''回复
lnzju写道:main(_ ){for(--_; putchar(_ ++ [" J!Mpwf!Zpv \ 1"] - 1););}
提示:
*用正确的表格编写程序
*考虑到通常主要参数是argc和argv,但是
可以使用任何名称调用它们。并且,如果未声明类型K& R
假定为int。
* _可以是变量的名称。
*拆分" ;对于"在其部分:for语句分为
初始化,继续条件和状态更新。第一个
和第三个可以为空。
* putchar返回写为unsigned int的字符
*应用于字符串的整数返回n第 - 个元素。 (这是我
不知道为什么)。
亲切问候。
Ivan Budiselic写道:
" lnzju" < GE ******* @ gmail.com>在消息中写道
新闻:11 ********************** @ g43g2000cwa.googlegr oups.com ...main(_){for(--_; putchar(_ ++ [" J!Mpwf!Zpv\1"] - 1););}
Don' T。这是垃圾。
嗯,这不是垃圾,因为它是有效的C !!
尝试编译它...
输出将是:
我爱你
但这段代码混淆....只有真正的C大师会理解它
我猜...不是这个新手......
Broeisi
main(_){for(--_;putchar(_++["J!Mpwf!Zpv\1"]-1););}
"lnzju" <ge*******@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...main(_){for(--_;putchar(_++["J!Mpwf!Zpv\1"]-1););}
Don''t. It''s rubbish.
--
Ivan Budiselic
ICQ# 104044323
IRC: buda @ #gamer.hr@quakenet
remove ''remove'' for reply
lnzju wrote:main(_){for(--_;putchar(_++["J!Mpwf!Zpv\1"]-1););}
Some hints:
* Write the program with the correct tabulation
* Take into account that usually main parameters are argc and argv, but
they can be called with any name. And, if type is not declared K&R
assumes int.
* _ can be the name of a variable.
* Split "for" in its parts: a for statement is divided in
initialization, continue condition and update of state. The first one
and third ones can be empty.
* putchar returns the character written as unsigned int
* integer applied to string returns n-th element. (this is something I
do not know why).
Kind regards.
Ivan Budiselic wrote:
"lnzju" <ge*******@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...main(_){for(--_;putchar(_++["J!Mpwf!Zpv\1"]-1););}
Don''t. It''s rubbish.
Well it ain''t rubbish cause it is valid C!!
Try compiling it..
The output will be:
I Love You
But this code is obfuscated.... Only the real C gurus will understand it
I Guess.... not this novice guy...
Broeisi
这篇关于如何理解这一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!