What Will Be The Correct Statement In The Following C Codep Pre #318
What will be the correct statement in the following C# code?</p> <pre><code class="language-csharp" line="1"> class trial { int i; float d; } struct sample { private int x; private Single y; private trial z; } sample s = new sample(); </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 - Structures - Quiz No.1.
What will be the correct statement in the following C# code?
class trial { int i; float d; } struct sample { private int x; private Single y; private trial z; } sample s = new sample();
trial object referred by z is created on the stack
z is created on the heap
Both s and z will be created on the heap
s will be created on the stack