What will be the output of the following code snippet:
using System;
public class Program
{
public static void Main(string] args)
{
String a = 'Acuvators":
String b = "ACUVATORS":
int ci
c = a.Compare To(b);
N
Console.WriteLine(c);
)
}
Answers
Answered by
3
Answer:
h poppy seed of 1857 the king's college hospital and Vishal I have done mam please find my attached the king the king a good morning I love you and Vishal please please please give me the king's college class login to Western
Answered by
0
The output is -1.
- This is in the C Sharp programming language.
- In this program, two strings are being compared by using the method CompareTo().
- Since the two strings have differences in cases of letters, the compiler will detect it as a difference.
- As the method CompareTo() returns a negative number when there is any difference.
- So, the output will be shown as -1.
Similar questions
English,
2 months ago
Sociology,
2 months ago
Math,
5 months ago
Science,
5 months ago
Accountancy,
10 months ago