Which of the following statements are correct about the C#.NET code snippet given below? sample c; c = new sample(); 1. It will create an object called sample. 2. It will create a nameless object of the type sample. 3. It will create an object of the type sample on the stack. 4. It will create a reference c on the stack and an object of the type sample on the heap. 5. It will create an object of the type sample either on the heap or on the stack depending on the size of the object.

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
 
Which of the following statements are correct about the C#.NET code snippet given below?

sample c;
c = new sample();
1. It will create an object called sample.
2. It will create a nameless object of the type sample.
3. It will create an object of the type sample on the stack.
4. It will create a reference c on the stack and an object of the type sample on the heap.
5. It will create an object of the type sample either on the heap or on the stack depending on the size of the object.

1.1,3

2.2,4

3.5,5

4.4,5


More MCQS Questions and answers

R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!