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[10] = { 14,15,16,17,18,19,20,21,22,23 };
- int *p = &nArr[3];
- printf(" number massiva nArr= %d\n", *p);
- printf("address= %d\n", p);
- foo(nArr);
- }
- /////////////////////////////////////////////////////
- void foo(int *p)
- {
- for(int i = 0; i < 10; i++)
- {
- if(p[i] == 17)
- {
- printf(" i = %d\n", i );
- printf("address = %d\n", &p[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement