Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
rev.c
Go to the documentation of this file.00001 #include <stdio.h>
00002 #include <string.h>
00003
00004 int main( int argc , char * argv )
00005 {
00006 char buf[1024] , rrr[1024] ;
00007 char * b ;
00008 int ii , lb , jj ;
00009
00010 do{
00011 b = fgets( buf , 1024 , stdin ) ;
00012 if( b == NULL ) exit(0) ;
00013 lb = strlen(b) ;
00014 if( lb <= 1 ){
00015 printf("\n") ;
00016 } else {
00017 for( ii=lb-2,jj=0 ; ii >= 0 ; ii--,jj++ ) rrr[jj] = buf[ii] ;
00018 rrr[jj] = '\0' ;
00019 printf("%s\n",rrr) ;
00020 }
00021 } while(1) ;
00022 exit(0) ;
00023 }