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,076 views
asked Jan 7, 2014 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 Aug 9, 2014 by smith Geek (15,340 points)

Related questions

0 votes
1 answer 1,436 views
0 votes
1 answer 433 views
0 votes
1 answer 56 views
0 votes
1 answer 34 views
34 views asked Jan 5, 2014 by anonymous
0 votes
1 answer 43 views
...