reverse.c
contents ::
  address.c
  atquick_sort.c
  bits.c
  countspace.c
  ctof.c
  hextoint.c
  hist.c
  indexof.c
  itob.c
  linkage.c
  lzw.c
  maxval.c
  merge.c
  merge_sort.c
  peof.c
  pointer.c
  quick2.c
  quick.c
  quick_sort.c
  reverse.c
  rftoc.c
  rmultiblank.c
  rtabs.c
  squeeze.c
  structoo.c
  syscall.c
  tempfunc.c
  tfc.c
  word.c

#include <stdio.h>

void reverse(char s[]);

/* this program is not highly successful 
   must remember to terminate string with '\0' */

main(){
  char string[8];
  string[0]='f'; 
  string[1]='p';
  string[2]='@';  
  string[3]='s';
  string[4]='t';  
  string[5]='i';
  string[6]='o'; 
  string[7]='\0';
  

  printf("%s\n", string);

  reverse(string);

  printf("%s\n", string);

  return 0;
}
  
void reverse(char s[]){
  int i = 0;
  int temp = 0;
  int z = 0;

  while(s[i]!='\0')
    ++i;

  for(z=0; z<(i/2); ++z){
    temp = s[z];
    s[z] = s[i-(z+1)];
    s[i-(z+1)] = temp;
  }


  return;
}

James Little