Re: How to understand this line of c ?



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.

.



Relevant Pages