C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

Write a C program to display reverse of the given string?

0 votes
3,122 views
asked by sara Guru (24,570 points)

1 Answer

0 votes
 public class StringReverseDemo
 {
public static void main(String args[])
{
 
String a ="MALAYALAM";
 
for(int i=0;i<=a.length()-1;i++)
{
System.out.print(a.charAt(i));
}
System.out.println("");
for(int i = a.length()-1; i >= 0; --i)
{
 
System.out.print(a.charAt(i)); 
}
}
 }
answered by smith Geek (15,340 points)

Related questions

0 votes
1 answer 460 views
0 votes
1 answer 58 views
0 votes
1 answer 35 views
0 votes
1 answer 44 views
...