Vidyalelo
C# Programming · Q89

Arrays and Strings in C Sharp

Programming · C# Programming · question 89

Q89

What will be the output of the following C# code? static void Main(string[] args) String obj = "hello"; String obj1 = "worn"; String obj2 = obj; Console.WriteLine(obj + " " + (obj1.Replace('w' ,'c'))); Console.ReadLine();

A.
hello hello
B.
hello worn
C.
hello corn
Answer
D.
hello

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board