23 lines
476 B
C
23 lines
476 B
C
/*
|
|
tp-pvec.c: TecPro Beispielprogramm
|
|
Kurzbeschreibung: Zeiger und Vektoren
|
|
D.Ertelt, C.Koch | HS-Emden-Leer | 25.11.2010
|
|
*/
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
unsigned int a[6], i, *aPtr;
|
|
|
|
printf("Vorher: aPtr = 0x%08x &a = 0x%08x\n", aPtr, &a);
|
|
for(i=0; i < 6; i++)
|
|
printf("a[%d] = %d\n", i, a[i]);
|
|
|
|
printf("Nachher: aPtr = 0x%08x\n", (aPtr = a));
|
|
for( ; aPtr < a + 6 ; aPtr++) {
|
|
*aPtr = i--;
|
|
printf("*(0x%08x) = %d\n", (aPtr), *aPtr); }
|
|
}
|
|
|