Mega Code Archive

 
Categories / C / Code Snippets
 

Using normal array subscripting

#include <stdio.h> #define ISIZE 10 int main( ) { char string10[ISIZE]; int x; for(x = 0; x < ISIZE; x++) string10[x]=getchar( ); for(x = ISIZE-1; x >= 0; x--) putchar(string10[x]); }