Vidyalelo
C# Programming · Q176

Classes and Objects in C Sharp

Programming · C# Programming · question 176

Q176

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();

A.
trial object referred by z is created on the stack
B.
z is created on the heap
C.
Both s and z will be created on the heap
D.
s will be created on the stack
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board