4 ms·
That's... not true? Example in C: void fun(void) { int a[16]; for (int i = 0; i < sizeof(a); i++) { a[i] = 1; } } I have allocated
by ahoka 2y ago
That's... not true?
Example in C:
void fun(void) {
int a[16];
for (int i = 0; i < sizeof(a); i++)
{
a[i] = 1;
}
}
I have allocated and referred to memory without pointers here.
- defrost 2y agoin some form or another is the key to their point. Here's something to try at home .. exactly your code save for this change: i[a] = 1; ... guess what, still compiles, still works !! WTF ??? you ask, well, you see, X[Y] is just syntactic sugar for X+Y - it's a pointer operation disguised to look like a rose (but it smells just the same).