frame1.cpp 625 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. # https://winlin.blog.csdn.net/article/details/109356535
  3. g++ frame1.cpp -g -O0 -o frame && ./frame
  4. */
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. int callee(int a, long b, long c, int d, long e, int f, int g, int h) {
  8. int v = a;
  9. v += (int)b;
  10. v += (int)c;
  11. v += (int)e;
  12. v += (int)g;
  13. v += (int)h;
  14. return v;
  15. }
  16. void caller() {
  17. int a = 10;
  18. int b = 20;
  19. long c = 30;
  20. int d = 40;
  21. int e = 50;
  22. int f = 60;
  23. int g = 70;
  24. int h = 80;
  25. int v = callee(a, b, c, d, e, f, g, h);
  26. printf("v=%d, c=%ld\n", v, c);
  27. }
  28. int main(int argc, char** argv)
  29. {
  30. caller();
  31. return 0;
  32. }