Re: How to understand this line of c ?



Broeisi wrote:
Ivan Budiselic wrote:

"lnzju" <geniuslee@xxxxxxxxx> wrote in message news:1136051664.299850.274430@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
main(_){for(--_;putchar(_++["J!Mpwf!Zpv\1"]-1););}

Don't. It's rubbish.

Well it ain't rubbish cause it is valid C!!

Actually, it's not. In C main either takes no arguments or two arguments, not 1.


Try compiling it..

The output will be:

I Love You

Not necessarily. It was written assuming ASCII, and not all C implementations use ASCII.


But this code is obfuscated.... Only the real C gurus will understand it
I Guess.... not this novice guy...

Depends. It's not that difficult. Just format it properly and learn a couple of tricks and it is simple.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
.




Relevant Pages

  • Re: encoding="utf-8" and formatted direct access
    ... I think that the use within programs of UTF-16 will probably be ... plain ASCII. ... are there any EBCDIC implementations? ... to make the default character set an 8-bit extension to ASCII such as ...
    (comp.lang.fortran)
  • Re: <ctype.h> toLower()
    ... >> Your the one who is trying to recommend what to use. ... If someone posts a question with code that assumes ASCII ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Breaking array into named strings
    ... That's mostly because JavaScript is an object-oriented language with ... rubbish, as current implementations and other OOPLs (e.g. ...
    (comp.lang.javascript)
  • Re: Case conversion functions
    ... Which character sets are supported by the various implementations ... AFAIK all accomodated the 7 bit ASCII set (at least as ... declare what charset/translation is used. ...
    (comp.lang.forth)
  • Re: ?
    ... The strcmp function compares the string pointed to by s1 to the ... ASCII is not part of the standard, ... definition for, for example, implementations with non-ASCII encodings ...
    (comp.lang.c)