C
This commit is contained in:
15
pointerarrays2.c
Executable file
15
pointerarrays2.c
Executable file
@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
|
||||
int myNumbers[4] = {25, 50, 75, 100};
|
||||
int *ptr = myNumbers;
|
||||
int i;
|
||||
*myNumbers = 101;
|
||||
*(myNumbers + 1) = 55;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
printf("%d\n", *(ptr + i));
|
||||
}
|
||||
printf("%d\n", *(myNumbers + 1));
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user