Vidyalelo
C# Programming · Q77

Basic Syntax and Data Types in C Sharp

Programming · C# Programming · question 77

Q77

What will be the output of the following C# string? (Enter a String : BOMBAY). static void Main(string[] args) string Str, Revstr = " "; int Length; Console.Write("Enter A String : "); Str = Console.ReadLine(); Length = Str.Length - 1; while (Length >= 0) Revstr = Revstr + Str[Length]; Length --; Console.WriteLine("Reverse String Is 0", Revstr); Console.ReadLine();

A.
BOMBA
B.
YABMOB
Answer
C.
BOMAYB
D.
YABMO

Answer: Option B

Solution

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