C# Programming - Classes and Objects - Discussion
Discussion Forum : Classes and Objects - General Questions (Q.No. 10)
10.
Which of the following statements are correct about the C#.NET code snippet given below?
sample c;
c = new sample();
- It will create an object called sample.
- It will create a nameless object of the type sample.
- It will create an object of the type sample on the stack.
- It will create a reference c on the stack and an object of the type sample on the heap.
- It will create an object of the type sample either on the heap or on the stack depending on the size of the object.
Discussion:
11 comments Page 2 of 2.
Pooja said:
1 decade ago
Why we say object of the type sample on heap ?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers