fork download
  1. #include <stdio.h>
  2. #define SIZE_OF(x) sizeof(x)/sizeof(x[0])
  3.  
  4. int main(void) {
  5. int arr[2];
  6. printf("arr[2]の要素数はズバリ%zu!", SIZE_OF(arr));
  7. return 0;
  8. }
Success #stdin #stdout 0s 2112KB
stdin
Standard input is empty
stdout
arr[2]の要素数はズバリ2!