Inheritance

Q1:
What will be the size of the object created by the following C#.NET code snippet?
namespace AptitudeCrackConsoleApplication
{ 
    class Baseclass
    {
        private int i; 
        protected int j; 
        public int k;
    }
    class Derived: Baseclass
    {
        private int x; 
        protected int y; 
        public int z;
    }
    class MyProgram
    { 
        static void Main (string[ ] args)
        { 
            Derived d = new Derived();
        } 
    } 
}

A 24 bytes

B 12 bytes

C 20 bytes

D 10 bytes

E 16 bytes

ANS:A - 24 bytes

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.