Convert CString to int/double/TCHAR * type in MFC

Source: Internet
Author: User
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; # \

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

}

 

 

     After the program was compiled and run, it was incredible to print a long text that exceeded the length of the source code, and these strings did not even appear in the source code at all. I know that the C code can be very weird, and it seems that this program uses a lot of recursion; but I never thought that there is such absurd source code, it seems basically garbled. I just searched, this code is an award-winning work of IOCCC.

 

     IOCCC stands for International Obfuscated C Code Contest. Whose C code is the most confusing and illegible.

     This competition has been held for 17 years, and here are some award-winning works in recent years.

     You can see more at http://www.au.ioccc.org/years.html, but many need to be compiled and run in a Linux environment. The more interesting ones that can run in the windows environment are already below.

     We assume that your compiled file names are abc.exe.

 

After compiling, enter under dos

 

 code

abc "ash nazg durhbatuluhk, ash nazg gimbatul, ash nazg thrakatuluhk, agh burzhumh-ishi krimpatul."> abc.pgm

 

Then view abc.pgm with a picture editor

 

 code

                                   #include \

                                   <stdio.h>

                     #include <stdlib.h>

                     #include <string.h>

                     #define w "Hk ~ HdA = Jk | Jk ~ LSyL [{M [wMcxNksNss:"

                   #define r "Ht @ H | @ = HdJHtJHdYHtY: HtFHtF = JDBIl" \

                   "DJTEJDFIlMIlM: HdMHdM = I | KIlMJTOJDOIlWITY: 8Y"

                 #define S "IT @ I \\ @ = HdHHtGH | KILJJDIJDH: H | KID" \

                 "K = HdQHtPH | TIDRJDRJDQ: JC? JK? = JDRJLRI | UItU: 8T"

               #define _ (i, j) L [i = 2 * T [j, O [i = O [j-R [j, T [i = 2 * \

               R [j-5 * T [j + 4 * O [j-L [j, R [i = 3 * T [j-R [j-3 * O [j + L [j,

             #define t "IS? I \\ @ = HdGHtGIDJILIJDIItHJTFJDF: 8J"

     #define y yy (4), yy (5), yy (6), yy (7)

   #define yy (i) R [i] = T [i], T [i] = O [i], O [i] = L [i]

#define Y _ (0], 4]) _ (1], 5]) _ (2], 6]) _ (3], 7]) _ = 1

#define v (i) (((R [i] * _ + T [i]) * _ + O [i]) * _ + L [i]) * 2

double b = 32, l, k, o, B, _; int Q, s, V, R [8], T [8], O [8], L [8];

#define q (Q, R) R = * X ++% 64 * 8, R | = * X / 8 & 7, Q = * X ++% 8, Q = Q * 64 + * X ++% 64-256,

# define p "G \\ QG \\ P = GLPGTPGdMGdNGtOGlOG" "dSGdRGDPGLPG \\ LG \\ LHtGHtH:"

# define W "Hs? H {? = HdGH | FI \\ II \\ GJlHJ" "lFL \\ DLTCMlAM \\ @ Ns} Nk |: 8G"

# define U "EDGEDH = EtCElDH {~ H | AJk}" "Jk? LSzL [| M [wMcxNksNst:"

# define u "Hs? H | @ = HdFHtEI" "\\ HI \\ FJLHJTD: 8H"

char * x, * X, (* i) [640], z [3] = "4_",

* Z = "4,8O4.8O4G" r U "4M" u S "4R" u t "4S8CHdDH | E = HtAIDAIt @ IlAJTCJDCIlKI \\ K: 8K" U

"4TDdWDdW = D \\ UD \\ VF \\ FFdHGtCGtEIDBIDDIlBIdDJT @ JLC: 8D" t "4UGDNG \\ L = GDJGLKHL \

FHLGHtEHtE: "p" 4ZFDTFLT = G | EGlHITBH | DIlDIdE: HtMH | M = JDBJLDKLAKDALDFKtFKdMK \

\\ LJTOJ \\ NJTMJTM: 8M4aGtFGlG = G | HG | H: G \\ IG \\ J = G | IG | I: GdKGlL = G | JG | J: 4b "W

S "4d" W t t "4g" r w "4iGlIGlK = G | JG | J: 4kHl @ Ht @ = HdDHtCHdPH | P: HdDHdD = It \

BIlDJTEJDFIdNI \\ N: 8N "w" 4lID @ IL @ = HlIH | FHlPH | NHt ^ H | ^: H | MH | N = J \\ D \

J \\ GK \\ OKTOKDXJtXItZI | YIlWI | V: 8 ^ 4mHLGH \\ G = HLVH \\ V: 4n "u t t

"4p" W "IT @ I \\ @ = HdHHtGIDKILIJLGJLG: JK? JK? = JDGJLGI | MJDL: 8M4 \

rHt @ H | @ = HtDH | BJdLJTH: ITEI \\ E = ILPILNNtCNlB: 8N4t "W t" 4u "

p "4zI [? Il @ = HlHH | HIDLILIJDII | HKDAJ | A: JtCJtC = JdLJtJL \

THLdFNk | Nc | \

: 8K "; main (

int C, char ** A) {for (x = A [1], i = calloc (strlen (x) +2,163840);

C-1; C <3? Q = _ = 0, (z [1] = * x ++)? ((* X ++ == 104? Z [1] ^ = 32:-x), X =

strstr (Z, z)) && (X + = C ++) :( printf ("P2% d 320 4", V = b / 2 + 32),

V * = 2, s = Q = 0, C = 4): C <4? Q-> 0? I [(int) ((l + = o) + b)] ((int) (k + = B)

] = 1: _? _- =. 5/256, o = (v (2)-(l = v (0))) / (Q = 16), B = (v (3)-(k = v (1)

)) / Q: * X> 60? Y, q (L [4], L [5]) q (L [6], L [7]) * X-61 || (++ X, y, y , y),

Y: * X> 57? ++ X, y, Y: * X> 54? ++ X, b + = * X ++% 64 * 4:-C: printf ("% d"

, i [Q] [s] + i [Q] [s + 1] + i [Q + 1] [s] + i [Q + 1] [s + 1]) && (Q + = 2) <V | | (Q =

0, s + = 2) <640

|| (C = 1));}

 

 

After compilation, enter abs> ioccc_ray.ppm under dos to generate an image (it may take a long time)

 

 code

X = 1024; Y = 768; A = 3;

J = 0; K = -10; L = -7; M = 1296; N = 36; O = 255; P = 9; _ = 1 << 15; E; S; C; D; F (b) { E = "1" "111886: 6: ?? AAF"

"FHHMMOO55557799 @@ >>> BBBGGIIKK" [b] -64; C = "C @ = :: C @@ == @ =: C @ =: C @ =: C5" "31/513/5131 /"

"31/531/53" [b] -64; S = b <22? 9: 0; D = 2;} I (x, Y, X) {Y? (X ^ = Y, X * X> x ? (X ^ = Y): 0, I (x, Y / 2, X

)) :( E = X);) H (x) (I (x, _, 0);) p; q (c, x, y, z, k, l, m, a, b) (F ( c

); x- = E * M; y- = S * M; z- = C * M; b = x * x / M + y * y / M + z

* z / M-D * D * M; a = -x * k / M -y * l / M-z * m / M; p = ((b = a * a / M-

b)> = 0? (I (b * M, _, 0), b = E, a + (a> b? -b: b)): -1.0);} Z; W; o

(c, x, y, z, k, l, m, a) (Z =! c? -1: Z; c <44? (q (c, x, y, z, k,

l, m, 0,0), (p> 0 && c! = a &&
(p <W || Z <0))? (W =

p, Z = c): 0, o (c + 1, x, y, z, k, l, m, a)): 0;) Q; T;

U; u; v; w; n (e, f, g, h, i, j, d, a, b, V) (o (0, e, f, g, h, i, j, a); d> 0

&& Z> = 0? (E + = h * W / M, f + = i * W / M, g + = j * W / M, F (Z), u = eE * M, v = fS * M, w = gC * M, b = (-2 * u-2 * v + w)

/ 3, H (u * u + v * v + w * w), b / = D, b * = b, b * = 200, b / = (M * M), V = Z, E! = 0 ? (u = -u * M / E, v = -v * M / E, w = -w * M /

E): 0, E = (h * u + i * v + j * w) / M, h- = u * E / (M / 2), i- = v * E / (M / 2), j -= w * E / (M / 2), n (e, f, g, h, i, j, d-1

, Z, 0,0), Q / = 2, T / = 2, U / = 2, V = V <22? 7: (V <30? 1: (V <38? 2: (V <44? 4: (V == 44? 6: 3))))

, Q + = V & 1? B: 0, T + = V & 2? B: 0, U + = V & 4? B: 0): (d == P? (G + = 2

, j = g> 0? g / 8: g / 20): 0, j> 0? (U = j * j / M, Q = 255- 250 * U / M, T = 255

-150 * U / M, U = 255 -100 * U / M): (U = j * j / M, U <M / 5? (Q = 255-210 * U

/ M, T = 255-435 * U / M, U = 255 -720 * U / M) :( U-= M / 5, Q = 213-110 * U

/ M, T = 168-113 * U / M, U = 111 -85 * U / M)), d! = P? (Q / = 2, T / = 2

, U / = 2): 0); Q = Q <0? 0: Q> O? O: Q; T = T <0? 0: T> O? O: T; U = U <0? 0:

U> O? O: U;} R; G; B; t (x, y, a, b) (n (M * J + M * 40 * (A * x + a) / X / AM * 20, M * K, M

* LM * 30 * (A * y + b) / Y / A + M * 15,0, M, 0, P, -1,0,0); R + = Q; G + = T; B + = U; ++ a <A? t (x, y, a,

b): (++ b <A? t (x, y, 0, b): 0);) r (x, y) (R = G = B = 0; t (x, y, 0,0) ; x <X? (printf ("% c% c% c", R / A / A, G

/ A / A, B / A / A), r (x + 1, y)): 0;} s (y) (r (0,-y? S (y), y: y);) main () {printf ("P6 \ n% i% i \ n255"

"\ n", X, Y); s (Y);}

 

 

After compiling, enter abc 0 0 1 to draw a function image of x ^ 2, and enter abc -1 0 0 1 to draw an image of x ^ 3-1. You can also try others.

 

 code

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#define _; double

#define void x, x

#define case (break, default) break [O]: default [O]:

#define switch (bool); for (; x <bool;

#define do (if, else) inIine (else)> int ## if?

#define true (--void ++)

#define false (++ void--)

char * O = "<60>!? \\\ n" _ doubIe [010] _ int0, int1 _ Iong = 0 _ inIine (int eIse) {int

O1O =! O _ l =! O; for (; O1O <010; ++ O1O) l + = (O1O [doubIe] * pow (eIse, O1O)); return l;} int

main (int booI, char * eIse []) {int I = 1, x =-* O; if (eIse) {for (; I <010 + 1; I ++) I [doubIe-1]

= booI> I? atof (I [eIse]) :! O switch (* O) x ++) abs (inIine (x))> Iong && (Iong = abs (inIine (x

))); int1 = Iong; main (-* O >> 1,0);} else {if (booI <* O >> 1) {int0 = int1; int1 = int0-2 * Iong / 0

[O] switch (5 [O])) putchar (x- * O? (Int0> = inIine (x) && do (1, x) do (0, true) do (0, false)

case (2,1) do (1, true) do (0, false) 6 [O] case (-3,6) do (0, false) 6 [O] -3 [O]: do (1, false )

case (5,4) x? booI? 0: 6 [O]: 7 [O]) + * O: 8 [O]), x ++; main (++ booI, 0);}}}

 

 

Precise square. This is interesting, it has been posted to OIBH.

Try abc 01524157875019052100.

The number you enter needs to have even digits, otherwise it will be supplemented by adding leading zeros.

 

 code

#include <stdio.h>

int l; int main (int o, char ** O,

int I) {char c, * D = O [1]; if (o> 0) {

for (l = 0; D [l]; D [l

++]-= 10) {D [l ++]-= 120; D [l]-=

110; while (! Main (0, O, l)) D [l]

+ = 20; putchar ((D [l] +1032)

/ 20);} putchar (10);} else {

c = o + (D [I] +82)% 10- (I> l / 2) *

(D [I-l + I] +72) / 10-9; D [I] + = I <0? 0

:! (o = main (c / 10, O, I-1)) * ((c + 999

)% 10- (D [I] +92)% 10);} return o;}

 

 

Draw a moon

 

 code

#include <stdio.h>

#include <math.h>

double l; main (_, o, O) (return putchar ((_-- + 22 && _ + 44 && main (_,-43, _), _ && o)? (main (-43, ++ o, O), (( l = (o + 21) / sqrt (3-O * 22-O * O), l * l <4 && (fabs ((((time (0) -607728)% 2551443) /405859.-4.7+acos (l / 2)) <1.57)) ["#"])): 10);}

 

 

Similar to hangman's word guessing game

 

 code

#ifndef int

#ifdef while

char s [234], d [56], * p = s, m = 'm';

#define int typedef (* define) (); \

define O [6] = {getc, putchar, (y) memmove, (y) printf, (y) n, (y) l};

#include __FILE__

signed short n (short bz) {

short pb = 0, Md = 1, ih = 2, sfp = 3, sjs = 4, fo, u = 5, scp = 6, t, gq = 7, oh, r = 8, pcf = 9, rs = 10 ;

char o = 1, i = 1, l, pc = i, b = r + o / 2, _f = 6, m = 7, s = 8, g, q, od = o * rs + 4 ^ s, js = _f / * 3-m * 'c', bs = 'g';

return 1;}

#y FILE c [a] + s, p [c], r [m] + u [i + 4 * o | f] -r [wob] [wad] + s * f-! w | o, L + x | cut

;} int main (i, love_unix) {* /;} int main (i, love_unix) {/ *;} int main (i, love_unix) {* \;} | here * /

while (FILE) for (; 9- (i = 0 [O] (f)););

for (; 32- (i = 0 [O] (f)); 0 && 3 [O] ("->% s <-", "gxdgbtgxsxpcctvpixktedhiedcte"));

for (; '\ n'-(i = O [0] (f));) (i> = 'a' && i <'z')? *

#include __FILE__

                                   "Demonic Smiley");} / * <g> * /

#else

#define while (int) short c = 0; int * f = fopen (__ ## int ## __, "r"); for (i = 0; i <25; i _) i [d] = 'A '+ (13 + i)% 26; main:

#define y define

#define _ ++

#include <stdio.h>

#include <string.h>

#include <time.h>

#include __FILE__

#endif

#elif defined (signed)

(p _) = (i-'a ') [d]:! (i-'z')? * (p _) = 32: (i> = 'A' && i <= 'Z') && (( 3 & 8 | 2) [O] (d + 1, d, 24L), * (p _) = 0 [d] = i); / *

#y FILE t, ra | js + t * gj, at [qdd]-= K, is _, qv _, veb _, ti _, ao [mqht] _ * /

if (c _ <6) goto main; 5 [O] (

#else

#define signed short l () (char q = '_'; p = s + 4 * (time (NULL)% 24) * 2, m = (char) p + 1; \

* (p + 8) = 0; for (d [3] = 10, d [33] = 3 [d] -10; d [3] <18; 3 [d] _) d [3] [p] = q; 3 [d] [p] = 0; \

hell: printf ("\ t [% s] \ n", p + 10); if (! m) goto stoned; \

froze: d [8] = (scanf ("% c", & (2 [d + __ STDC __])), 2 [d +! NULL]) & 223; if (! (3 [d + 5]-'\ n' )) goto froze; \

for (m = 1 [d] = 0; d [1] <8; 2 [d-1] _) (p [d [1]]-d [8] || (p [3 [d-2] +10] = 4 [d + 4])) + (p [d [1] +10] -q || m _); \

goto hell; stoned :;}

FILE * X (FILE s) {char i, iev, jmqhu, xqht, mqh, ujek, sxydw, kdj, yjb, utou, qhre, eamy, jxxe, bt;}

#endif
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.