Computer Science, asked by metriksha2002, 9 months ago


“Size of an object is equal to the sum of sizes of data members and member function in the class”. Justify the correctness of the statement.

Answers

Answered by falakbansal102
9

Answer:

  1. Size of all non-static data members
  2. Order of data members
  1. Byte alignment or byte padding
  1. Size of its immediate base class
  1. The existence of virtual function(s) (Dynamic polymorphism using virtual functions).
  1. Compiler being used
  1. Mode of inheritance (virtual inheritance)

Explanation:

Similar questions