I don't get this C/C++ Joke
- by Buttercup
After reading this article on thedailywtf.com, I'm not sure that I really got the joke.
It says there that some guy changed the code from
int function()
{
int x;
char data_string[15];
...
x = 2;
strcpy(data_string,"data data data");
...
}
to
int function()
{
int x = 2;
char data_string[15] = "data data data";
...
}
everywhere in the code and that for some reason did inflate the size of the executable from 1 to 2 CDs (or maybe it didn't do that?).
Obviously I'm not familiar enough with C/C++ to get this joke, but what seems strangest is that the 2nd code listing seems "cleaner"—at least from what I've been told in school (that is that initializing variables is a good thing, not a bad one).