Name: Anonymous 2010-10-31 5:35
#include <stdio.h>
main()
{
int a;
while(a != 256)
{putchar(a);
a++;}
}
But if I add a = 0; after int a;, it ends fine?
Something to do with a variable not being initialized properly, and therefore, not being able to be compared or something?
Compiled with Code::Blocks+GCC or mingw or something. The debugger also reports no relevant issues with the initial code.
main()
{
int a;
while(a != 256)
{putchar(a);
a++;}
}
But if I add a = 0; after int a;, it ends fine?
Something to do with a variable not being initialized properly, and therefore, not being able to be compared or something?
Compiled with Code::Blocks+GCC or mingw or something. The debugger also reports no relevant issues with the initial code.