Home / C# Programming / Structures :: Discussion

Discussion :: Structures

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

     

  2. 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.

    Both ss and z will be created on the heap.

    E.

    ss will be created on the stack.

    View Answer

    Workspace

    Answer : Option E

    Explanation :

    No answer description available for this question.


Be The First To Comment