Hello World  | Expert | | Join Date: Mar 2008 Location: California
Posts: 478
| |
Happy Hello World Day to the C/C++ forum! Today is the day to write cryptic "Hello World" programs and say hello to at least ten people: -
#include <iostream>
-
using namespace std;
-
int main() {
-
char oldHello[] = "Happy Whirl!";
-
char newHello[] = "Jello(~orld)";
-
int badChars[] = {1, 2, 3, 4, 7, 8, 9, 10};
-
cout << oldHello;
-
int j = 7;
-
for (int i = 11; i >= 0; i--) {
-
cout << '\b';
-
if (badChars[j] == i) {
-
cout << newHello[i] << '\b';
-
j--;
-
}
-
}
-
cout << endl;
-
cin.get();
-
return 0;
-
}
-
Hello to the C/C++ people:
weaknessforcats (4660 posts)
Banfa (3405 posts)
sicarie (2837 posts)
JosAH (2186 posts)
Ganon11 (1819 posts)
gpraghuram (1095 posts)
horace1 (1059 posts)
Savage (1018 posts)
AdrianH (977 posts)
RedSon (685 posts)
BISKOT188 (1 post)
Gregor McAlen (9 posts)
sandeepkavade (18 posts)
mohanht (1 post)
(Follow the link and it will make sense.)
|  | Moderator | | Join Date: Oct 2006 Location: New York, United States of America
Posts: 3,428
| | | re: Hello World |  | Expert | | Join Date: Mar 2008 Location: California
Posts: 478
| | | re: Hello World
Hello, Ganon11. I'm very impressed at how obfusticated that is. Quote:
Originally Posted by Banfa Well this would be a C entry
...
Although I am sure Jos could do better I am a mere amateur at obfuscation compared to him. I like it. I'm putting it in this thread as well: - #include <stdio.h>
-
int main(int O, char *_O[]){static char O0[]=
-
{0111,0147,0157,0150,0152,0046,0120,0147,0173
-
,0146,0157,0055,0007};if(O>sizeof O0)return 0
-
;putchar(O0[O-!0]^O);main(O+!0,_O);return 0;}
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,449 network members.
|