frame0.cpp 358 B

1234567891011121314151617181920212223
  1. /*
  2. # https://winlin.blog.csdn.net/article/details/109356535
  3. g++ frame0.cpp -g -O0 -o frame && ./frame
  4. */
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. int callee(int a, long b) {
  8. int c = a;
  9. c += (int)b;
  10. return c;
  11. }
  12. void caller() {
  13. int v = callee(10, 20);
  14. printf("v=%d\n", v);
  15. }
  16. int main(int argc, char** argv)
  17. {
  18. caller();
  19. return 0;
  20. }