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