Which of the following statements is correct about the C#.NET code

Loading

โœช Choose the correct option.

Which of the following statements is correct about the C#.NET code snippet given below?

class Trial {
int i;
Decimal d;
}
struct Sample {
private int x;
private Single y;
private Trial z;
}
Sample ss = new Sample();

A. ss will be created on the heap.
B. Trial object referred by z will be created on the stack.
C. z will be created on the heap.
D. ss will be created on the stack.

Leave a Comment