Your array is not a variable length array. An array of variable length is an array whose size is not a constant expression. For example, it datais an array of variable length in the following:
int i = 10;
char data[i];
To see an example of the code that has sizeofevaluates its operand, try something like this:
#include <stdio.h>
int main(void)
{
int i = 41;
printf("i: %d\n", i);
printf("array size: %zu\n", sizeof (char[i++]));
printf("i now: %d\n", i);
return 0;
}
He prints:
i: 41
array size: 41
i now: 42