filmov
tv
c , pointer incomplete type , error invalid application of 'sizeof' to incomplete type 'int'

Показать описание
array_without_size.c: In function ‘main’:
array_without_size.c:5:36: error: invalid application of ‘sizeof’ to incomplete type ‘int[]’
printf("size of a is %d\n", sizeof(a));
^
array_without_size.c:16:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
printf("size of a is %d\n", sizeof(a));
^
array_without_size.c: At top level:
array_without_size.c:3:5: warning: array ‘a’ assumed to have one element
int a [];
^
array_without_size.c:5:36: error: invalid application of ‘sizeof’ to incomplete type ‘int[]’
printf("size of a is %d\n", sizeof(a));
^
array_without_size.c:16:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
printf("size of a is %d\n", sizeof(a));
^
array_without_size.c: At top level:
array_without_size.c:3:5: warning: array ‘a’ assumed to have one element
int a [];
^