Is there any expression that would be evaluated as operand of a sizeof. I have come to know in case of variable length operand with sizeof, the expression would be evaluated. But I cant make an example, I wrote the code below,
int a[]={1,2,3};
printf("%d",sizeof(a[1]++));
printf("%d\n",a[1]);
but here I observed from output expression a[1]++
is not evaluating.
how to make an example??
a[1]++
isn't a variable length array, so it's not evaluated. – Deanndeannasizeof
as a 4 byte integer. – Evslinsizeof
doesn't evaluate its operand unless it's a variable length array. https://mcmap.net/q/16355/-strangest-language-feature/… – Nixie