#include "Stdio.h"

main()
{
int a,b,c;
int count = 1;
for (b=c=10;a="- FIGURE?, UMKC,XYZHello Folks,\
TFy!QJu ROo TNn(ROo)SLq SLq ULo+\
UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\
NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\
HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\
T|S~Pn SPm SOn TNn ULo0ULo#ULo-W\
Hq!WFs XDt!" [b+++21]; )
for(; a-- > 64 ; )
putchar ( ++c=='Z' ? c = c/ 9:33^b&1);
return 0;
}

AFTER COMPILING PRESS Alt+f5 TO VIEW OUTPUT

sree_ec commented: cool +1

Sweet code! May I recommend adding getchar(); at the end to pause? Just makes it a little easier for the user :)

Yes ofcourse you can it will be useful

nice work dude!!

But could'nt get the logic.. :)

That is super cool....:) Trying to understand the logic....

That was cool. But you know what, it would be super cool if u explain the code too, because i have a doubt that even you can understand that.

commented: doubting +0

It's not too difficult.

count is just a distraction.

b starts at 10 and increments until ugly_string is 0. So the useful part of the string is from ugly_string[31] to the end; the first 31 chars are padding just to obfuscate it.

a is set to the next character in the string for each iteration of the external loop, and decremented down to 64 -- so the inner for loop just runs N = ugly_string - 64 times.

c starts at 10 and increments until it reaches 90, but it's only used when its value is 90 and subsequently knocked back down to 10.

Interesting notes are the repetition and similar groups of 4 characters in the source string. There are, umm, 46 lines of output and 42 groups of four, plus 3 extra characters -- note that there is no terminating newline on the output, and I think we definitely have a pattern there.

Come to think of it, it makes sense that each character in the source string tells you how many times to print the next character -- the last part of the conditional tells you whether to print ' ' or '!' -- the middle part of the conditional tells you when to print a newline instead -- yeah, without working out the details, that's your program explained in a nutshell.

While it's not by far the best obfuscation I've ever seen, it's certainly a valiant effort.

Toooooooooo Cool .. Super cool...

Mera
Bharath
Mahan

:) :) :) :)

Toooooooooo Cool .. Super cool...

Mera
Bharath
Mahan

WTFFFF,.. Green color not showing up in my comments.. X(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.