4
votes
3answers
4k views

Understanding stack frame of function call in C/C++?

I am trying to understand how stack frames are built and which variables (params) are pushed to stack in what order? Some search results showed that the C/C++ compiler decides based on operations ...
6
votes
3answers
4k views

A good C Variable Length Array example

This question got rather a freezing reception at SO, so I decided to delete it there and try here instead. If you think it does not fit here either, please at least leave a comment on suggestion how ...
0
votes
1answer
148 views

Tool to visualize values from variables during the execution of a program in C

I just need to see what is stored, in realtime, in some particular variables and struct used by an application written in C. I need something like the stack tracer that comes with the ADT plugins for ...
1
vote
1answer
615 views

In c/c++, are block-scope variables stacked only if the block is executed?

Suppose this: void func() { ... if( blah ) { int x; } ... } Is the space for x reserved on the stack immediately when func is entered, or only if the block is actually executed? Or is it ...