American most "blame" C program contest for winning procedures

xiaoxiao2021-03-06  17

Main () {Printf (& UNIX ["/ 021% Six / 012/0"], (UNIX) ["Have"] "fun" -0x60);}

Because: array STR [N] <==> (n) [Str] So: (UNIX) ["Have"] "FUN" - 0x60 <==> "Have" [1] "fun" -0x60 : 'A' "fun" -0x60 Because: 'a' = 0x61 So: Change to "Fun" 1 (implied with the same type of operation priority?) Because: "Fun" is a CHAR type pointer so: Point "Un "Because: / 021 is an octal number, representing the first character, so: & 1 [" / 021Unix / 012/0 "] <==>" Unix / 012/0 "because: 012 is the eight-in-line wrap, / 0 is The string ends so: the final result is UNIX

The key is that UNIX is a macro definition of the compiler Printf (& UNIX ["/ 021% Six / 012/0"], (UNIX) ["Have"] "FUN" - 0x60); ==> Printf (& 1 [" / 021% Six / N / 0 "], (1) [" Have "] " Fun "- 0x60); ==> Printf (&" / 021% Six / N / 0 "[1]," Have " [1] "FUN" - 0x60); ==> Printf ("% Six / N", 'a' "fun" - 0x60); ==> Printf ("% Six / N", 0x61 "Fun "- 0x60); ==> Printf ("% six / n "," fun " 1); ==> Printf ("% six / n "," un ");

转载请注明原文地址:https://www.9cbs.com/read-58160.html

New Post(0)