fork download
  1. #include <stdio.h>
  2.  
  3. void foo( unsigned char a,
  4. unsigned char b,
  5. unsigned char c,
  6. ... )
  7. {
  8. printf( "a: %p\nb: %p\nc: %p\n",
  9. (void *)&a,
  10. (void *)&b,
  11. (void *)&c );
  12.  
  13. printf( "d1: %hhu\n", *(&c - 8) );
  14. printf( "d2: %hhu\n", *(&c - 4) );
  15. printf( "d3: %hhu\n", *(&c + 4) );
  16. printf( "d4: %hhu\n", *(&c + 8) );
  17. }
  18.  
  19.  
  20.  
  21. int main(void)
  22. {
  23. foo( 1, 2, 3, 4 );
  24.  
  25.  
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
a: 0xbfb42458
b: 0xbfb42454
c: 0xbfb42450
d1: 84
d2: 80
d3: 2
d4: 1