Which Of The Following Is The Correct Way To Settle Down Values #323
Which of the following is the correct way to settle down values into the structure variable ‘e’ defined in the following C# code snippet?</p> <pre><code class="language-csharp" line="1"> struct emp { public String name; public int age; public Single sal; } emp e = new emp(); </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.1.
Which of the following is the correct way to settle down values into the structure variable ‘e’ defined in the following C# code snippet?
struct emp { public String name; public int age; public Single sal; } emp e = new emp();
e.name = "Ankit"; e.age = 24; e.sal = 200;
With emp e { .name = "Ankit"; .age = 24; .sal = 200; }
name = "Ankit"; age = 24; sal = 200;
All of the mentioned