Systemnahe Programmierung in C: Zeigersalat |
1#include <stdio.h>
2
3char *c[] = { "ENTER", "NEW", "POINT", "FIRST" };
4
5char **cp[] = { c + 3, c + 2, c + 1, c };
6
7char ***cpp = cp;
8
9
10int
11main (void)
12{
13 printf ("%s", **++cpp);
14 printf ("%s", *--*++cpp + 3);
15 printf ("%s", *cpp[-2] + 3);
16 printf ("%s\n", cpp[-1][-1] + 1);
17
18 return 0;
19}
|
Letzte Änderung: 11.01.2007 | © Prof. Dr. Uwe Schmidt |