Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void foo(int *p);
- ///////////////////////////////////////////////////////
- int main()
- {
- int nArr[19] = { 17, 5, 0, 777, 11, -2, 198, -3, 7, 3 };
- foo(&nArr[-7]);
- }
- ////////////////////////////////////////////////////////
- void foo(int *p)
- {
- for(int i = 0; i < 10; i++)
- {
- printf(" arr[%d] = %3d \n", i, p[i]);
- }
- }
- /*
- #include <stdio.h>
- int nMin = 12;
- int *p = &nMin;
- ///////////////////////////////////////////////////////
- int main()
- {
- printf(" nMin = %d\n",nMin);
- printf(" p = %d\n",p);
- printf("&nMin = %d\n",&nMin);
- printf(" *p = %d\n",*p);
- }
- */
- /*
- #include <stdio.h>
- int n = 12;
- ///////////////////////////////////////////////////////
- int main()
- {
- int n = 77;
- printf("n = %d\n", ::n);
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement