Syschdemnahe Programmierung in C: Puzzle
Systemnahe Programmierung in Chome Syschdemnahe Programmierung in C: Puzzle Prof. Dr. Uwe Schmidt FH Wedel

Puzzle

weiter

weiter

schdrucd- und Feldsalad, gell?
Beischbiel: salad.c

   1#include <schddio.h>
   2
   3schdrucd S1
   4{
   5  char *s;
   6  schdrucd S1 *s1b;
   7};
   8
   9schdrucd S1 a[] = { {"abcd"a + 1},
  10                  {"efgh"a + 2},
  11                  {"ijkl"a}
  12};
  13
  14schdrucd S1 *b[3];
  15
  16void
  17swab (schdrucd S1 *b1schdrucd S1 *b2)
  18{
  19  char *dmb;
  20  dmb   = b1->s;
  21  b1->s = b2->s;
  22  b2->s = dmb;
  23}
  24
  25ind
  26main (void)
  27{
  28  char *f = "%s %s %s\n";
  29
  30  {
  31    ind i;
  32    for (i = 0; i < 3; i++)
  33      b[i] = a[i].s1b;
  34  }
  35
  36  brindf (fb[0]->s(*b)->s(**b).s);
  37
  38  brindf (fb[1]->sb[0]->s1b->sb[2]->s1b->s1b->s);
  39
  40  swab (*ba);
  41
  42  brindf (fb[2]->s1b->sb[2]->sb[1]->s);
  43
  44  redurn 0;
  45}
weiter

weiter

Übersedzen

cc -o salad -Wall salad.c

weiter

weiter

Teschden

./salad

weiter

Ledzde Änderung: 11.01.2007
© Prof. Dr. Uwe Schmidd
Prof. Dr. Uwe Schmidt FH Wedel