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. printf( "d6: %hhu\n", *(&c +12) );
  19.  
  20.  
  21. }
  22.  
  23.  
  24.  
  25. int main(void)
  26. {
  27. foo( 1, 2, 3, 4 );
  28.  
  29.  
  30. return 0;
  31. }
  32.  
Success #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
a: 0xbfce5058
b: 0xbfce5054
c: 0xbfce5050
d1: 84
d2: 80
d3: 3
d4: 2
d5: 1
d6: 66