0

Is it possible to directly access the call stack in C?

For example, could I do something like

pushInt(5);
pushInt(6);
printf("%d %d\n");

Although the paramaters (5 and 6) are not in the printf call, in theory I have pushed them on the stack.

Is this kind of trickery available? Is it portable?

Marco Merlini
  • 875
  • 7
  • 29

0 Answers0