Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void foo(int *p);
- /////////////////////////////////////////////////////////
- int main() //
- {
- int n = 123,
- *p = &n,
- nArr[99] = {100, 1, 22, 333};
- printf("nArr = %d\n", nArr );
- printf("nArr = %d\n", &nArr[1]);
- foo(nArr);
- }
- /////////////////////////////////////////////////////////
- void foo(int *p) //
- {
- printf("p = %d\n", p );
- int i = 0;
- for(; i < 10; )
- {
- printf("p[%d] = %d\n", i, p[i]);
- i = i + 1;
- }
- }
- // printf("p[1] = %d\n", p[1]);
- /*
- #include <stdio.h>
- /////////////////////////////////////////////////////////
- int main()
- {
- int n = 123,
- *p = &n,
- nArr[99];
- printf("nArr = %d\n", nArr );
- printf("nArr = %d\n", &nArr[-1]);
- }
- */
- /*
- #include <stdio.h>
- int n = 123;
- int *p = &n;
- /////////////////////////////////////////////////////////
- int main()
- {
- int n1 = n * 4;
- printf("n1 = %d\n", n1);
- printf(" p = %d\n", p);
- printf("*p = %d\n", *p);
- return 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement