The follow code generates y is the answer, but i've never assigned 42 to y, how could y be 42?
#include <stdio.h>
void doit2(void)
{
int x;
int y;
if (x == 42)
{
printf("x is the answer\n");
}
else if (y == 42)
{
printf("y is the answer\n");
}
else
{
printf("there is no answer\n");
}
}
void doit1(int a)
{
int b = a;
}
int main(void)
{
doit1(42);
doit2();
}