Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
How to reverse a string in c# console application?
Home
Technology
How to reverse a string in c# console application?
asked
Nov 30, 2020
in
Technology
by
JackTerrance
How to reverse a string in c# console application?
interview-question-answer
technology-questions-answers
1
Answer
0
votes
answered
Nov 30, 2020
by
JackTerrance
Below is the code to reverse the string first i have put the string in char[] datatypes. And after that using for loop we have reverse the string character by character. Here i have use console application.
internal static void RevStr(string str)
{
char[] charOfArray = str.ToCharArray();
for (int i = 0, j = str.Length - 1; i < j; i++, j--)
{
charOfArray[i] = str[j];
charOfArray[j] = str[i];
}
string reversestring = new string(charOfArray);
Console.WriteLine(reversestring);
}
Related questions
0
votes
Q: PUT Request for REST API in C# console application using HttpClient()
I am very new to creating and consuming REST web services in C#. I have programmed the data I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Apr 20, 2022
in
Education
by
JackTerrance
c#rest
0
votes
Q: Auto-configuration report can be logged to the console by enabling debug mode while starting the application.
Auto-configuration report can be logged to the console by enabling debug mode while starting the application. A. True B. False...
asked
Nov 8, 2022
in
Education
by
JackTerrance
spring-boot-framework-interview-question-answer
0
votes
Q: Console Application Menu with Classes C++
I am currently working on a personal project in C++, and I'm having a lot of fun learning. I just learned some ... MainMenu::~MainMenu(){} void MainMenu::displayMenu() { std::cout...
asked
May 3, 2022
in
Education
by
JackTerrance
c
oopmenuconsole
0
votes
Q: Reverse a string in Python
How can I reverse a str object in Python? Select the correct answer from above options...
asked
Jan 22, 2022
in
Education
by
JackTerrance
questions-answers
0
votes
Q: Write a program to take a string parameter (st) of a function reversing(). Reverse the sentence in s
Write a program to take a string parameter (st) of a function reversing(). Reverse the sentence in sucha way so ... None Hate All Love Select the correct answer from above options...
asked
Dec 19, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: String Slicing means:1.to convert the string in capital2.to check whether a string has more than one word3. to get only a part of a string4. to convert the string in reverse order
String Slicing means: 1.to convert the string in capital 2.to check whether a string has more than one ... in reverse order computet Select the correct answer from above options...
asked
Dec 13, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: How to capture the image in picturebox and make it downloadable in c# application?
im developing a c# application (Photo Album Viewer), Im having Picturebox (Displays the selected image in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 2, 2022
in
Education
by
JackTerrance
c#image
0
votes
Q: How can you strip non-ASCII characters from a string? (in C#)
How can you strip non-ASCII characters from a string? (in C#) JavaScript questions and answers, JavaScript ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 19, 2022
in
Education
by
JackTerrance
c#
0
votes
Q: How to download the Console log for a particular Jenkins build programmatically?
How to download the Console log for a particular Jenkins build programmatically?...
asked
Jul 17, 2021
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
0
votes
Q: How to print to console javascript?
How to print to console javascript?...
asked
Dec 10, 2020
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
0
votes
Q: What is Search Console and how to link with Google Analytics?
What is Search Console and how to link with Google Analytics? ...
asked
Oct 3, 2020
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
0
votes
Q: What is meant by reverse polarity and how it can be fixed?
What is meant by reverse polarity and how it can be fixed?...
asked
Dec 14, 2020
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
0
votes
Q: How will you reverse a list in Python?
How will you reverse a list in Python?...
asked
Nov 26, 2020
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
0
votes
Q: How can I get webview console log through adb?
I am building an Android application with Cordova which is running inside a webview. I know I can access ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Apr 14, 2022
in
Education
by
JackTerrance
androidgoogle-chrome
0
votes
Q: How to read console output in j2me cellphones? Where does System.out.println() go?
When writing j2me applications for cellphones, using System.out.println() prints on the console if using an ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 16, 2022
in
Education
by
JackTerrance
javamobilejava-me
...