# In this question, you are going to assume the following

In this question, you are going to assume the following data type and its corresponding sizes: char: 1 byte and int: 3 bytes. From a C-like snippet of a code below, answer the rest of this questions. Note: use a lost of casting in the second half of this snippet to make sure things are clearly declared. typedef struct type1{int i[3];} typeA; typedef struct type2{typeA j[2];} typeB; typeA *a; typeB *b; unsigned long *c; int i; a = malloc(2*sizeof(typeB)); b = a; c = a; for(i=0;i<18;i++) { *(c+i) = (unsigned char)(i%8); } Assuming that the actual location of a after malloc is called is at the physical address 0x10000 in DRAM. Using the concept of address we learn from our class, the table below shows our DRAM starting from the address 0x10000. Please put in the values inside each bytes in our DRAM starting at address 0x10000 up to the end of where a is malloced for. Write XX in the byte that is unknown/unassigned, and write YY on the byte that is not in the range that a covers. I gave you the first byte, finish the rest. Hint: Draw the organization of the struct out on a piece of paper. Pair this up with the concept of an array and type casting. This question is actually very easy but you need to be a bit careful. Hint2: Please note that our table is actually 1D. Each row is 8 bytes in size and the address of the next row basically continue from the end of the earlier row. I just have no method to draw a very long 1D table so I need to resort to a 2D table here.

Pages (275 words)
Standard price: \$0.00

### Latest Reviews

Impressed with the sample above? Wait there is more

Related Questions

### A 38-year-old woman presents to the office with complaints of weight

A 38-year-old woman presents to the office with complaints of weight loss, fatigue, and insomnia of 3-month duration. She reports that she has been feeling

### Discussion Question: While change can be described as an inevitable part

Discussion Question: While change can be described as an inevitable part of life, no progress can be attained without change. This week, we will

### Celebrated historian Ira Berlin shown below wrote a book about the evolution of colonial slavery entitled: Many Thousands Gone. In

Celebrated historian Ira Berlin (shown below), wrote a book about the evolution of colonial slavery entitled: Many Thousands Gone. In it, he makes the assertion

### Assessment of the Musculoskeletal System The body is constantly sending signals

Assessment of the Musculoskeletal System The body is constantly sending signals about its health. One of the most easily recognized signals is pain. Musculoskeletal

### Company: The Clorox Company   Product name: Cleaning and Disinfecting Products   Section

Company: The Clorox Company   Product name: Cleaning and Disinfecting Products   Section 1) Competitive Priorities and OM Strategy [goal: around 600 words] 1a) A

### The purpose of this assignment is to identify and analyze

The purpose of this assignment is to identify and analyze the needs of an EHR in a clinical setting in order to determine a potential

### What are some of the Constitutional Challenges surrounding the Covis

What are some of the Constitutional Challenges surrounding the Covis 19 Pandemic? Incorporate in your paper how (Federalism) the powers of state and federal government

### Instructions Statistical Techniques For this final paper, you will develop a research

Instructions Statistical Techniques For this final paper, you will develop a research proposal to solve a business problem choosing one of the statistical techniques we

### Competency Examine the use of qualitative and quantitative studies for business

Competency Examine the use of qualitative and quantitative studies for business research. Scenario You work in a senior manager role at a software development company.

### Dress Code State law does not give students the right to choose their mode of dress. Thus the matter

Dress CodeState law does not give students the right to choose their mode of dress. Thus, the matter of student dress and grooming is at

### Discussion 2: Theoretical and Conceptual Frameworks After reading and considering

Discussion 2: Theoretical and Conceptual Frameworks After reading and considering the differences and similarities between theoretical and conceptual frameworks from different sources, the next step

### Hi all, This course homework is Direct reading of Industrial

Hi all,  This course homework is Direct reading of Industrial Organization (ECO632).  The task is: Choose three or more papers to write a proposal based on

New questions