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 + 0) );
  16. printf( "d4: %hhu\n", *(&c + 4) );
  17. printf( "d5: %hhu\n", *(&c + 8) );
  18.  
  19.  
  20. }
  21.  
  22.  
  23.  
  24. int main(void)
  25. {
  26. foo( 1, 2, 3, 4 );
  27.  
  28.  
  29. return 0;
  30. }
  31.  
Success #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
a: 0xbf9e5ee8
b: 0xbf9e5ee4
c: 0xbf9e5ee0
d1: 228
d2: 224
d3: 3
d4: 2
d5: 1