What is Memory Alignment?
Answers were Sorted based on User's Feedback
Answer / sv
Memory alignment is the restriction imposed on memory
allocation in such a way that values associated with
multibyte get assigned only at certain places of memory.
Such Memory alignment though generally not very common
issue in OOPS terminology as the compiler takes care of
allocation of bytes at proper locations.
| Is This Answer Correct ? | 15 Yes | 1 No |
Answer / achal ubbott
Above is correct. E.g. an ARM processor stores an integer(4
bytes wide) at an address which is multiple of 4 only. So
an integer would not be stored at say 0x0009 address.
| Is This Answer Correct ? | 5 Yes | 5 No |
How would you implement a substr() function that extracts a sub string from a given string?
Can member data be public?
What does #define mean in c++?
Is c++ the hardest programming language?
Who was the creator of c++?
What is conversion constructor?
How can you differentiate between inheritance and implementation in c++?
Why do we need c++?
What is the disadvantage of using a macro?
What is class and structure in c++?
What is the use of 'using' declaration in c++?
What is function overriding?