Why do local variables have to be stack dynamic to support recursion?

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Question

Why do local variables have to be stack dynamic to support recursion?

Expert Solution
Step 1

Machine architecture and programming languages
�      Programming languages reflect the underlying gadget
�      Modern computers use van Neumann architecture
�    There are  number one additives
�   Memory, which shops each this system instructions and the records
�   The processor, which offers instructions to adjust the facts in memory
�      In a programming language,
�    The abstractions for the memory cells are the variables
�    The abstractions for the processor are functions
 

Fundamental issues of variables
�      The attributes of variables
�    Name
�    Address
�    Type
�    Value
�    Lifetime
�    Scope
 
�      Concepts involving variables
�    Alias
�    Binding instances
�    Type Checking
�    Strong typing
�    Type compatibility
�    Static & dynamic scoping

Names � a fundamental attribute of variables

�      Design issue of the programming language

�   Should the names be case sensitive?

�   Should special names be reserved words or keywords?

�   A keyword can be used by the programmer as an identifier.

�   A reserved word cannot.

�   How many characters are allowed in a name?

�   Which characters should be allowed in names?

 

Addresses � another fundamental attribute of variables

�      The address of a variable is the memory address with which it is associated.

�    This association is made in the symbol table for static variables.

�      In some languages it is possible for the same name to be associated with different addresses at different time in the program

�    Different subprograms may have local variables with the same name

�      It is also possible to have multiple variables associated with the same address

�    The variables that access the same memory location are called aliases

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY