1 /* 2 * constpointer.c 3 * 4 * Beispiel-Programm Zeiger-Variable 5 * 6 * Autor: H.Drachenfels 7 * Erstellt am: 25.3.2021 8 */
9
10 #include <stdio.h>
11
12 int main(void)
13 {
14 const int i = 0;
15 const int *p = &i;
16
17 int j = 0;
18 int * const q = &j;
19
20 // *p = 0; // Fehler, *p konstant
21 p = NULL;
22
23 *q = 0;
24 // q = NULL; // Fehler, q konstant
25
26 return 0;
27 }
28