3 ms·
Anyone else spot the uninitialized variable in the banner program? Also: > What's the output of the following program. (No, it's not 10!!!) What's the point
by kazinator 11y ago
Anyone else spot the uninitialized variable in the banner program?
Also:
> What's the output of the following program. (No, it's not 10!!!)
What's the point of including a program that calls malloc without including a prototype for it, after asking the reader earlier answer why such a program segfaults on IA-64 but not IA-32?
(The answer is: a constraint is violated, requiring a diagnostic, because an int * object pointer is assigned the return value of malloc whose implicit declaration marks it as returning int. The comment issue is a red herring.)
- brown-dragon 11y agoI can't figure out why is it checking `pr` in the while loop. Perhaps it's simply been left over from an earlier version.
- kmill 11y agoThat's funny, I added the include for stdlib so couldn't find the issue with the malloc one.