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 are Structure passing and returning implemented by the compiler?
What are the various operations performed on stack?
class X { private: int a; protected: X(){cout<<"X constructor was called"<<endl;} ~X(){cout<<"X destructor was called"<<endl} }; Referring to the code above, which one of the following statements regarding "X" is TRUE? a) X is an abstract class. b) Only subclasses of X may create X objects. c) Instances of X cannot be created. d) X objects can only be created using the default copy constructor. e) Only friends can create instances of X objects.
Can we use resume in error handling i.e. in the catch block
find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.
Is c++ used anymore?
Which function should be used to free the memory allocated by calloc()?
What is Memory Alignment?
class HasStatic { static int I; }; Referring to the sample code above, what is the appropriate method of defining the member variable "I", and assigning it the value 10, outside of the class declaration? a) HasStatic I = 10; b) int static I = 10; c) static I(10); d) static I = 10; e) int HasStatic::I = 10;
Is c++ still being used?
. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?
Which operator cannot be overloaded c++?