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

String s1, s2;
s1 = "Hi";
s2 = "Hi";

1.String objects cannot be created without using new.
2.Only one object will get created.
3.s1 and s2 both will refer to the same object.
4.Two objects will get created, one pointed to by s1 and another pointed to by s2.
5.s1 and s2 are references to the same object.

 Posted by Murugavelmsc on 2/18/2013 | Category: C# Interview questions | Views: 6815 | Points: 40
Select from following answers:
  1. 1, 2, 4
  2. 2, 3, 5
  3. 3,4
  4. 2,5
  5. All Above

Show Correct Answer


Source: http://www.indiabix.com/c-shar | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Murugavelmsc