fork download
  1. #include <stdio.h>
  2.  
  3. #define length_of_array(a) (sizeof(a)/sizeof((a)[0]))
  4.  
  5. int test[] = {1,2,3};
  6. int test2[length_of_array(test)];
  7.  
  8. int main() {
  9. printf("%zu\n", length_of_array(test2));
  10.  
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 1676KB
stdin
Standard input is empty
stdout
3