1. Computer Science Engineering (CSE)
  2. .NET Programming
  3. If s1 and s2 are references to two strin...
Q.

If s1 and s2 are references to two strings, then which of the following is the correct way to compare the two references?

A. s1 is s2
B. s1 = s2
C. s1.Equals(s2)
D. strcmp(s1, s2)
Answer» C. s1.Equals(s2)
View all MCQs in:   .NET Programming

Discussion