struct { char gribble [12]; int word; short little; } records [5]; For each of the following variables, give its offset in bytes from the first byte of the array records. Assume x86-64 architecture. (a) records [0].word (b) records [0].gribble [1] records [0].little (c) (d) records [2] .gribble [0] (e) records [4]

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 13RQ: How is an array stored in main memory? How is a linked list stored in main memory? What are their...
icon
Related questions
Question

Consider the following declaration of an array of structures:

struct {
char gribble [12];
int word;
short little;
} records [5];
For each of the following variables, give its offset in bytes from the first byte of the array
records. Assume x86-64 architecture.
(a) records [0].word
(b) records [0].gribble [1]
(c) records [0].little
(d) records [2] .gribble [0]
(e) records [4]
Transcribed Image Text:struct { char gribble [12]; int word; short little; } records [5]; For each of the following variables, give its offset in bytes from the first byte of the array records. Assume x86-64 architecture. (a) records [0].word (b) records [0].gribble [1] (c) records [0].little (d) records [2] .gribble [0] (e) records [4]
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning