Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on How to dismantle a compiler bomb. Parent comment
You can even do sparse initialization if we're talking C99 here, like so:
int array[] = {1, 2, 3, [99] = -1}
And you'll get an array of length 100 {1, 2, 3, 0, 0, 0, ..., 0, -1}
Any missing initialized element is always 0 if initialization is done at all, though.
There are no comments on this comment yet.
You can even do sparse initialization if we're talking C99 here, like so:
int array[] = {1, 2, 3, [99] = -1}
And you'll get an array of length 100 {1, 2, 3, 0, 0, 0, ..., 0, -1}
Any missing initialized element is always 0 if initialization is done at all, though.