Which Of The Following Is The Correct Result For The Given #328
Which of the following is the correct result for the given statement in the C#.NET statement given below?<br /> p = q</p> <pre><code class="language-csharp" line="1"> struct employee { private int employee id; private string city; } employee q = new employee(); employee p; p = q; </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.2.
Which of the following is the correct result for the given statement in the C#.NET statement given below?
p = q
p = q
struct employee { private int employee id; private string city; } employee q = new employee(); employee p; p = q;
Elements of ‘q’ will be copied into corresponding elements of p
Address stored in q will get copied into p
Address of first element of q will get copied into p
Once assignment is over. q will go out of scope and hence get exited forever