aboutsummaryrefslogtreecommitdiffstats
path: root/src/standalone/labx4/debug.c
blob: d6a3707554f4cdfd923a0c74a7aeec4a98c4f607 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>

int main()
{
  char str[] = "sihtgubed";
  char *stri = &str[8];
  char *buf[9];
  char **bufi, **bufend;
  bufi = buf;
  bufend = &buf[9];
  
  while (bufi != bufend){
    *bufi = stri;
    bufi++;
    stri--;
  }
  
  while (bufi != buf){
    *(*bufi) -= 32;
    bufi--;
  }
  
  while (bufi != bufend){
    printf("%c", **bufi);
    bufi++;
  }
}