What is Memory Alignment?

Answers were Sorted based on User's Feedback



What is Memory Alignment?..

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

What is Memory Alignment?..

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

Post New Answer

More C++ General Interview Questions

You're given an array containing both positive and negative integers and required to find the sub-array with the largest sum (O(N) a la KBL). Write a routine in C for the above.

4 Answers  


What C++ libraries are you proficient with?

1 Answers   Google,


What is volatile and pragma? When they are used?

1 Answers  


Differentiate between an array and a list?

0 Answers  


Does c++ vector allocate memory?

0 Answers  






What is the error in the code below and how should it be corrected?

0 Answers  


Do you know what are pure virtual functions?

0 Answers  


What is different in C++, compare with unix?

0 Answers  


What is #include iomanip?

0 Answers  


what is the basic concept of c++(object oriented programing)

4 Answers   Wipro,


What is data type in c++?

0 Answers  


There is a magic square matrix in such a way that sum of a column or a row are same like 3 5 2 4 3 3 3 2 5 sum of each column and row is 10. you have to check that matrix is magic matrix or not?

1 Answers   TCS,


Categories