Does main have a return address, dynamic link or return value in C?

activation-record, c, program-entry-point, stack

Solution

All of these terms are purely implementation details - C has no notion of "return addresses" or "dynamic links." It doesn't even have a notion of a "stack" at all. Most implementations of C have these objects in them, and in those implementations it is possible that they exist for `main`. However, there is no requirement that this happen.

Hope this helps!

Problem

According to our book, each function has an activation record in the run-time stack in C. Each of these activation records has a return address, dynamic link, and return value. Does main have these also?

Original source