fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. /* Read a size from the user; inhibits compiler optimizations. */
  5. int n;
  6. scanf("%d", &n); // Yes, I should error-check. :-)
  7.  
  8. /* We now have a VLA. */
  9. int arr[n];
  10.  
  11. /* What is the type of &arr? */
  12. void* ptr = (&arr) + 1;
  13.  
  14. /* Seems like this skipped over things properly... */
  15. printf("%p\n", arr);
  16. printf("%p\n", ptr);
  17. }
  18.  
Success #stdin #stdout 0s 9432KB
stdin
4
stdout
0x7ffddcba1cf0
0x7ffddcba1d00