Doxygen Source Code Documentation
rev.c File Reference
#include <stdio.h>
#include <string.h>
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv) |
Function Documentation
|
Definition at line 4 of file rev.c. References argc.
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 } |