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