[Cs3] Lab 03 and Static Variables
Mikhail Nesterenko
mikhail at cs.kent.edu
Tue Feb 1 16:05:38 EST 2022
>
> Thank you for the lecture today, I really enjoyed it!
>
> I have some questions regarding Lab 03 and static variables.
>
> So for the 3rd lab do we add elements to the beginning of the linked list
> like a stack, or do we add it to the end of the list?
Up to you. It is not specified in the lab assignment.
>
> Also regarding static variables, are static variables allocated on the
> stack but the function frame is saved on the stack, and that's how it saves
> it's value when the scope ends?
There is a dedicated segment in the computer program called data for
static variables. Here is a wiki page:
https://en.wikipedia.org/wiki/Data_segment
Thanks,
--
Mikhail
More information about the cs3
mailing list