Home / C# Programming / Structures :: Discussion

Discussion :: Structures

  1. Which of the following will be the correct result of the statement b = a in the C#.NET code snippet given below?

     struct Address 
     {   
         private int plotno; 
         private String city;
     } 
     Address a = new Address(); 
     Address b; 
     b = a;
    

  2. A.

    All elements of a will get copied into corresponding elements of b.

    B.

    Address stored in a will get copied into b.

    C.

    Once assignment is over a will get garbage collected.

    D.

    Once assignment is over a will go out of scope, hence will die.

    E.

    Address of the first element of a will get copied into b.

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    No answer description available for this question.


Be The First To Comment