1
I’m reading the book "Algorithms and Programming with Examples in Pascal and C" and in it there are two paragraphs that left me in doubt, are they:
Two alternative forms are offered by some programming languages to manage dynamic allocation: (1) declaration of variables within blocks (Chapter 4) or in subprograms (Chapter 9); and (2) allocation of space by pointers.
In dynamic allocation involving variables declared within blocks or subprograms, variables store application values in the same way as static variables, but they are allocated by the system when starting the execution of the block or subprogram and only persist as long as the execution of it lasts. Memory areas associated with variables declared in this mode are automatically released by the system.
According to the author, the declaration of variables within blocks or in subprograms involves dynamic allocation. Is this statement correct? In my understanding, only pointer allocation is considered dynamic allocation.
This question @Maneiro answers all your questions. I don’t know to what extent it won’t be duplicated
– Isac
@Isac, the post you refer to doesn’t answer "all" questions I’ve asked here. My questioning is more related to the terms "dynamic allocation" or "automatic allocation" than the concept of.
– Rodrigo Costa
If that’s the case, I don’t think you made that very clear in the question.
– Isac
Did any of the answers solve your question? Do you think you can accept one of them? Check out the [tour] how to do this, if you haven’t already. You would help the community by identifying what was the best solution for you. You can accept only one of them. But you can vote on any question or answer you find useful on the entire site.
– Maniero