« Home | XML Parser in Java » | Algorithms Used in Garbage collection » | Lower Case to Uppre Case Conversion » | PRINTING THE NON-PRIMES » | PRIME FACTORS OF ALL NON-PRIMES BELOW 500 » | What is Garbage Collection & Why is Garbage Collec... » | Public static void main (String args[]) » | Delete and Update values in MySql Using Java » | Insert values into table Using Java » | Program to Retrive values from Mysql Using Java » 

Friday, March 24, 2006 

Program to reverse a string

/*This is a program to reverse a given string that is taken from keyboard as input*/
#include<stdio.h>
#define length 20
main(){
int a[length];
int c=getchar();
int i=0,k=0;
while((c!='\n'))
{
a[i]=c;
i++;
c=getchar();
}
for(k=i-1;k>=0;k--)
printf("%c",a[k]);

}

About me

  • I'm phanindra
  • From Hyderabad, Andhra Pradesh, India
  • An Alumini of JNTU Hyd into happening IT industry...
My profile

Visitors
Bloggeries Blog Directory BlogRankings.com singapore blog directory blog search directory
Google
 
Web conceptoftheday.blospot.com