What Will Be Size Of The Object Created Depicted By C Code #359
What will be size of the object created depicted by C# code snippet?</p> <pre><code class="language-csharp" line="1"> class baseclass { private int a; protected int b; public int c; } class derived : baseclass { private int x; protected int y; public int z; } class Program { static Void Main(string[] args) { derived a = new derived(); } } </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Object Oriented Concepts - Inheritance Implementation - Quiz No.1.
What will be size of the object created depicted by C# code snippet?
class baseclass { private int a; protected int b; public int c; } class derived : baseclass { private int x; protected int y; public int z; } class Program { static Void Main(string[] args) { derived a = new derived(); } }
20 bytes
12 bytes
16 bytes
24 bytes