Question 3 We use a 32-bit operating system. Its int types, memory addresses, and registers, such as ESP, EBP and EIP, are represented by 32 bits. We compile a program that calls this function in this operating system. void foo (int **input, int par) { int tag = par; int *arr[10]; printf("%x", tag); if (tag > 1) { while (*input != 0x0000) { *arr = *input; arr++; input++; } } printf(“%x", tag); } (1) Please plot the stack frame of foo function before it returns.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 19SA
icon
Related questions
Question

Please plot the stack frame of foo function before it returns.

Question 3 We use a 32-bit operating system. Its int types, memory addresses, and
registers, such as ESP, EBP and EIP, are represented by 32 bits. We compile a
program that calls this function in this operating system.
void foo (int **input, int par) {
int tag = par;
int *arr[10];
printf("%x", tag);
if (tag > 1) {
while (*input != 0x0000)
{
*arr = *input;
arr++;
input++;
}
}
printf(“%x", tag);
}
(1) Please plot the stack frame of foo function before it returns.
Transcribed Image Text:Question 3 We use a 32-bit operating system. Its int types, memory addresses, and registers, such as ESP, EBP and EIP, are represented by 32 bits. We compile a program that calls this function in this operating system. void foo (int **input, int par) { int tag = par; int *arr[10]; printf("%x", tag); if (tag > 1) { while (*input != 0x0000) { *arr = *input; arr++; input++; } } printf(“%x", tag); } (1) Please plot the stack frame of foo function before it returns.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT