"In real life, the boy may actually be a better programmer than the girl.”
I think in real life the boy will shoot himself in the leg without knowing the order of evaluation in C.
I think in real life the boy will shoot himself in the leg without knowing the order of evaluation in C.
void foo(void)
{
int a = 41;
a = a++;
printf("%d\n", a);
}
She says 'a gets an undefined value' but that's not true at all. There are compilers that will look at that undefined function and omit the entire body, including the print.It is extremely important to understand that undefined behavior can and will break everything, even if it appears to be behaving whenever you look.