-
-
Save JIElite/634f18ba9e2648b48585 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(){ | |
int a[10] = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90}; | |
int *p = &a[5]; | |
printf("The address of &a[5]:\t%p\n", &a[5]); | |
printf("The value of p :\t%p\n", p); | |
printf(" *p : %d\n", *p); | |
printf(" p : %p\n", p); | |
printf(" *p + 1 : %d\n", *p + 1); | |
printf(" p + 1 : %p\n", p + 1); | |
printf(" *(p + 1) : %d\n", *(p + 1)); | |
printf(" *(p - 1) : %d\n", *(p - 1)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment