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 |
What does ios :: app do in c++?
Explain all the C++ concepts using examples.
What is the difference between the indirection operator and the address of oper-ator?
Why do we need templates?
How do I make turbo c++ full screen?
What are the steps in the development cycle?
What is the difference between a "copy constructor" and an "assignment operator" in C++?
What is size of string in c++?
What does it mean to declare a member function as static?
What is the difference between new/delete and malloc/free?
What is a float in c++?
int f() { int I = 12; int &r = I; r += r / 4; int *p = &r; *p += r; return I; } Referring to the sample code above, what is the return value of the function "f()"? a) 12 b) 15 c) 24 d) 17 e) 30