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 are the different types of variables in C++?
What is command line arguments in C++? What are its uses? Where we have to use this?
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].
Do class method definitions?
Show the declaration for a static member variable.
What are the unique features of C++.
Generally variables are stored in heap memory. When he variables are created in stack?
What is compilation?
Why do we use constructor?
What is a mutable member?
Write a corrected statement in c++ so that the statement will work properly. if (x = y) x = 2*z;
What is an explicit constructor?