Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Examine the function below and answer the following questions. int global = 25; // declared outside function int func( int x, char *Y, BYTE

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

1. Examine the function below and answer the following questions. int global = 25; // declared outside function int func( int x, char *Y, BYTE Z ) int a; char b[] = "The lazy dog ate the red fox before jumping over it." char *c; c = (char *) malloc (512K); a = b[0]; return a; a. What is the classification of memory in which the following are stored. (Program, Stack, or Heap) i. x ii. Y iii. a iv. c V. The elements in the variable 'c'. vi. global vii. The array variable 'b'. viii. The elements in the variable 'b'. ix. The text string for 'b'. b. How many bytes used on the stack for 'Z' . c. How many 4K pages of physical memory are needed for the above malloc? d. How many bytes are used on the stack for the local variables in this function? 2. Determine the highest power of 2 alignment for the following numbers. a. Ox52 b. OxF1C c. 0x2A2700 d. Ox3E600 e. Ox772100000 3. What are the values of the following registers given the instructions below. Show in hexadecimal and all leading zeros if applicable. a. mov eax, 25 eax = b. mov ebx, OxAF1283 ebx = - c. Given ebx above, mov bx, 0x5A ebx d. Given the ebx from ".", mov bl,0x5A ebx = e. esp - 0x128F0, push Ox 348A esp = f. esp = 0x128EC, pop eax esp g. Given 'e.' and 'f.', eax? eax = 4. Show the following little endian number in big endian format. OD FO AD OB 1. Examine the function below and answer the following questions. int global = 25; // declared outside function int func( int x, char *Y, BYTE Z ) int a; char b[] = "The lazy dog ate the red fox before jumping over it." char *c; c = (char *) malloc (512K); a = b[0]; return a; a. What is the classification of memory in which the following are stored. (Program, Stack, or Heap) i. x ii. Y iii. a iv. c V. The elements in the variable 'c'. vi. global vii. The array variable 'b'. viii. The elements in the variable 'b'. ix. The text string for 'b'. b. How many bytes used on the stack for 'Z' . c. How many 4K pages of physical memory are needed for the above malloc? d. How many bytes are used on the stack for the local variables in this function? 2. Determine the highest power of 2 alignment for the following numbers. a. Ox52 b. OxF1C c. 0x2A2700 d. Ox3E600 e. Ox772100000 3. What are the values of the following registers given the instructions below. Show in hexadecimal and all leading zeros if applicable. a. mov eax, 25 eax = b. mov ebx, OxAF1283 ebx = - c. Given ebx above, mov bx, 0x5A ebx d. Given the ebx from ".", mov bl,0x5A ebx = e. esp - 0x128F0, push Ox 348A esp = f. esp = 0x128EC, pop eax esp g. Given 'e.' and 'f.', eax? eax = 4. Show the following little endian number in big endian format. OD FO AD OB

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

=+Does it present new cocktails or review restaurants?

Answered: 1 week ago

Question

=+Is the message on-strategy?

Answered: 1 week ago