void printc(char val);
void prints(short val);
void printi(int val);
void printstr(char *str);

struct sample {
  char c;
  short s;
  int i;
  char *p;
};

int main()
{
  struct sample s[] = {
    { 10, 20, 30, "abcdefg" },
    { 11, 21, 31, "ABCDEFG" },
    { 12, 22, 32, "01234" },
    { 13, 23, 33, "56789" },
    { -1, -1, -1, 0 }
  };
  struct sample *p;

  for (p = s; p->p; p++) {
    printc(p->c);
    prints(p->s);
    printi(p->i);
    printstr(p->p);
  }

  p = s;

  p = p + 2;
  printc(p->c);
  prints(p->s);
  printi(p->i);
  printstr(p->p);

  p = p - 1;
  printc(p->c);
  prints(p->s);
  printi(p->i);
  printstr(p->p);

  p += 2;
  printc(p->c);
  prints(p->s);
  printi(p->i);
  printstr(p->p);

  p -= 3;
  printc(p->c);
  prints(p->s);
  printi(p->i);
  printstr(p->p);

  return 0;
}
