answersLogoWhite

0


Best Answer

The data elements of a structure are laid out according to the order they are declared. Padding bytes may also be inserted between members to ensure all members are correctly aligned. Memory alignment can be user-defined, however it's generally better to align objects according to the underlying architecture. For instance, on a 32-bit system the underlying architecture has a 4-byte word length, thus an object that is equal or greater in length is best aligned upon a 4-byte boundary to keep memory access cycles to a minimum. Types that are smaller than the word length are usually aligned so that they do not cross a word boundary, such that a single 4-byte word can store 4 char types, 2 shorts, or 2 chars and 1 short. If the total size of the structure crosses a word boundary, padding bytes are inserted after the final member so the total size is an exact multiple of the word length. However, if the total size is less than a single word length to the extent that two or more structures may fit within a word, no padding bytes are required.

Given that each structure member is positioned at a constant zero-based offset from the start address of the structure, the compiler can use trivial pointer arithmetic to access the individual members of an instance of the structure, just as easily as it can calculate the address of an array element from its zero-based suffix (index).

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How are the data elements of a structure accessed and processed explain?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Explain how elements in the same group are similar?

They have the same outer electron structure and thus similar chemical properties.


Does the Bohr model work for all elements?

No, the Bohr model does not work for all elements. It accurately describes the electronic structure of hydrogen and other single-electron systems, but it fails to explain the behavior of multi-electron atoms. Instead, a more complex quantum mechanical description, such as the Schrödinger equation, is required to accurately describe the electronic structure of all elements.


What have you made if you use balls to explain the structure of a molecule?

If you use balls to explain the structure of a molecule you have made a model.


Explain 5 key elements in determining the success of OSH?

Explain 5 key elements in determining the success of OSH?"


What is systems approach Explain the elements of a system?

What are the elements of system approaches


Explain three ways that coating can improve a surface?

1). Improve the appearance of an old structure 2). Protect the surface from harmful elements 3). Protect surface from aging


How individuals needs and preferences may influence how learning and development activities are accessed or delivered?

explain how individual needs and preferences may influence how learning and development activities are accessed or delivered


How individual needs and preferences may influence how learning and development activities are accessed or delivered?

explain how individual needs and preferences may influence how learning and development activities are accessed or delivered


Explain The merits of using a deque to implement a stack in data structure?

Explain The merits of using a deque to implement a stack in data structure


What is forest in data structure explain?

forest


Explain the structure of Illinois general assembly?

.


Explain various multimedia components?

Multimedia is the field concerned with the computer-controlled integration of text, graphics, drawings, still and moving images (Video), animation, audio, and any other media where every type of information can be represented, stored, transmitted and processed digitally.The basic five Elements of Multimedia1. Text2. Images3. Audio4. Animation5. Video