Home / MCQ Bank / Computer
Computer Arrays And Strings In C Sharp

What will be the output of the following C# code? class Program { static void Main(string[] args) { String s1 = "I love You"; String s2 = s1; Console.WriteLine((s1 == s2) + " " + s1.Equals(s2)); Console.ReadLine(); } }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • true true

Related Computer Questions

What will be the output of the following PHP code ? <?php $i = 2 ; while (++ $i ) { while ( $i --> 0 ) print $i; } ?> Choose the right declaration of longjmp() function. Which one of the following is not an access modifier? What is the purpose of the difference() method for sets? How many times is the recursive function called, when the following code is executed? void my_recursive_function(int n) { if(n == 0) return; printf("%d ",n); my_recursive_function(n-1); } int main() { my_recursive_function(10); return 0; }