Feb 12, 2009 at 7:01am UTC
There will be no epic win today...
Feb 13, 2009 at 2:31am UTC
Hahaha - Epic win! But it is the next day :)
Last edited on Feb 13, 2009 at 2:32am UTC
Feb 13, 2009 at 4:39am UTC
No idea on how many systems and compilers this will work. Probably not on many. It at least works on Win32 with VC++ and MinGW.
1 2 3 4 5 6 7 8 9 10 11 12
#include <cstdio>
#include <cstring>
int main(){
int a=0xEFBEADDE,b=0xEFBEADDE;
strcpy((char *)(&b)-8-((char *)(&a)-(char *)(&b)-sizeof (int )),"Hello, " );
char Hello[8];
printf(Hello);
strcpy(Hello,"World!\n" );
printf(Hello);
return 0;
}
Last edited on Feb 13, 2009 at 4:42am UTC
Feb 13, 2009 at 6:58am UTC
I'm not nearly that creative...
1 2 3
#define it int main(){printf("Hello World!");return 0;}
#include<iostream>
it
Last edited on Feb 13, 2009 at 6:59am UTC
Feb 14, 2009 at 7:44pm UTC
Now that's something, there!
Feb 14, 2009 at 10:09pm UTC
I couldn't resist participating in this.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream>
using namespace std;
int main()
{
bool spoke = true ;
speak:
spoke = !spoke;
cout << (spoke ? "World!" : "Hello " );
if (!spoke)
goto speak;
else
cout << endl;
return 0;
}
~psault
Last edited on Feb 14, 2009 at 10:13pm UTC
Feb 15, 2009 at 4:16am UTC
We have a goto :O! Give that man some cake!
Feb 16, 2009 at 2:56pm UTC
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
O
OOOO
OOOOOOOXX
OOOOOOOOXXOOO
OOOOOOOOXXOOOOOO
OOOOOOOOXXOOOOOOIII
OOOOOOOOXXOOOOOOIIIOOO
OOOOOOOXXOOOOOOOIIIOOOOO
OOOOOOXXOOOOOOOIIIOOOOOOOO
OOXXOOOOOOOIIIOOOOOOOOOOO
OOOOOOIIIOOOOOOOOOOOOOO
OIIIOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOY
OOOOOOOYYYY
YYYYYYY
YYY
I tried to make it look like a piece of cake, but it's not that easy... xD
Has anybody an idea of what else could be done to make a "stinkbomb" ? :p
Last edited on Feb 16, 2009 at 2:59pm UTC
Feb 16, 2009 at 3:21pm UTC
_____
_..--'''@ @'''--.._
.' @ @ '.
( @ /----------^-)
|'._ @ //|###########|
|~ ''--..@|',|}}}}}}}}}}}|
| ~ ~ |/ |###########|
| ~~ ~ ~|./|{{{{{{{{{{{|
'._ ~ ~ ~ |,/`````````````
''--.~.|/
Here you go:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#include <iostream>
using namespace std;
int main()
{
int count = 0;
int CHAR = 72;
LOOP:
if (count == 12) goto END;
else printf("%c" ,CHAR);
switch (count)
{
case 0: CHAR = CHAR+29; break ;
case 1: CHAR = CHAR+7; break ;
case 2: break ;
case 3: CHAR = CHAR+3; break ;
case 4: CHAR = CHAR-79; break ;
case 5: CHAR = CHAR+55; break ;
case 6: CHAR = CHAR+24; break ;
case 7: CHAR = CHAR+3; break ;
case 8: CHAR = CHAR-6; break ;
case 9: CHAR = CHAR-8; break ;
case 10: CHAR = CHAR-67; break ;
}
count=count+1;
goto LOOP;
END:
return 0;
}
Last edited on Feb 16, 2009 at 3:48pm UTC
Feb 16, 2009 at 4:20pm UTC
Really nice cake! Can I eat it ?
And another crappy program :D (or "how to spend time on stupid things" xD)