Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Reverse String without using Reverse() Function
WhatsApp
Ranjit Powar
May 22
2016
1.1
k
0
0
Code:
class
Program
{
static
void
Main(
string
[] args)
{
string
strInput =
string
.Empty;
string
strRev =
string
.Empty;
Console.WriteLine(
"Enter String"
);
strInput = Console.ReadLine();
for
(
int
i = strInput.Length-1; i >= 0; i--)
{
strRev += strInput[i];
}
Console.WriteLine(
"Reverse string : {0}"
,strRev);
Console.ReadLine();
}
}
Output:
Enter String
ABC
Reverse string : CBA
C#
Reverse String
Up Next
Reverse String without using Reverse() Function