What Will Be The Correct Statement In The Following C Codep Pre #317
What will be the correct statement in the following C# code?</p> <pre><code class="language-csharp" line="1"> struct book { private String name; private int pages; private Single price; } book b = new book(); </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.
What will be the correct statement in the following C# code?
struct book { private String name; private int pages; private Single price; } book b = new book();
New structure can be inherited from struct book
When the program terminates, variable b will get garbage collected
The structure variable ‘b’ will be created on the stack
When the program terminates, variable b will get garbage collected