Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % cat so30681402.c
- #include <stdio.h>
- int main(void) {
- int za[0];
- printf("sizeof array with no elements is %d.\n", (int)sizeof za);
- return 0;
- }
- % clang -std=c99 -pedantic -Weverything so30681402.c
- so30681402.c:4:12: warning: zero size arrays are an extension
- [-Wzero-length-array]
- int za[0];
- ^
- 1 warning generated.
- % ./a.out
- sizeof array with no elements is 0.
- Get link:https://ouo.io/19y8ao
Add Comment
Please, Sign In to add comment