Classes and Objects

Q1:
Which of the following statements is correct about the C#.NET code snippet given below?
class Student s1, s2; // Here 'Student' is a user-defined class.
s1 = new Student(); 
s2 = new Student();

A Contents of s1 and s2 will be exactly same.

B The two objects will get created on the stack.

C Contents of the two objects created will be exactly same.

D The two objects will always be created in adjacent memory locations.

E We should use delete() to delete the two objects from memory.

ANS:C - Contents of the two objects created will be exactly same.

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.