#include <iostream.h>
#include <conio.h>
#include<stdio.h>
void main ( )
{
int count , i ;
char line[40] , reverse[40] ;
puts ("Enter A String - ") ;
gets (line) ;
count = 0 ;
while (line[count] != '\0')
count++ ;
count-- ;
for(i=0 ; i<40 ; i++)
reverse[i] = 0 ;
i = 0 ;
while (count >= 0)
{
reverse[count] = line[i] ;
count-- ;
i++ ;
}
puts ("\nThe reversed string is - ") ;
puts (reverse) ;
getch ( ) ;
}
0 comments:
Post a Comment