Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int nArr[10] = {44, 1, 2, 3, 4, 5, 6, 7, 8, 9};
- //////////////////////////////////////////////////////////
- int main()
- {
- int *p = &nArr[4];
- printf("&nArr[4] = %d \n", p );
- printf("&nArr[4] = %d \n", &nArr[4]);
- printf("&nArr[5] = %d \n", &nArr[5]);
- printf("&nArr[5] = %d \n", p + 1 );
- printf("&nArr[5] = %d \n", &p[1] );
- printf(" nArr[5] = %d \n", p[1] );
- }
- /*
- #include <stdio.h>
- int n = 44;
- //////////////////////////////////////////////////////////
- int main()
- {
- printf("address of n = %d \n", &n);
- int *p = &n;
- printf("address of n = %d \n", p);
- printf("address of p = %d \n", &p);
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement