learning-cc4e

Solution to https://cc4e.com/. If you copy these you're not right in the head.
git clone https://kaka.farm/~git/learning-cc4e
Log | Files | Refs

solution.c (253B)


      1 void reverse(t)
      2 char t[];
      3 {
      4   char *start = t;
      5   char *end;
      6   char temp;
      7 
      8   for (end = start; *end != '\0'; ++end) {};
      9 
     10   --end;
     11 
     12     for (; start < end; ++start, --end) {
     13       temp = *start;
     14       *start = *end;
     15       *end = temp;
     16     }
     17     return;
     18 }