January 01, 2002
The New C:
Listing 4: sizeof VLA through a pointer
#include <stdio.h>
int main()
{
int n = 10;
for (int i = 0; i < 3; ++i) {
char (*pvla)[n];
n += 10;
printf("%zu ", sizeof *pvla);
}
return 0;
}
End of Listing
|
|
||||||||||||||||||||||||||||
|
|
|
|