Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- ////////////////////////////////////////////////////////////
- int main()
- {
- int n = 32,
- nArr[99] = {10, 111, 2, 333, 4444};
- int *p = &nArr[4];
- printf(" nArr[4] = %d\n", nArr[4]);
- printf("address of nArr[4] = %d\n", &nArr[4]);
- printf("address of nArr[4] = %d\n", p );
- printf("address of nArr[5] = %d\n", &nArr[5]);
- printf("address of nArr[6] = %d\n", &nArr[6]);
- printf("address of nArr[7] = %d\n", &nArr[7]);
- }
- /*
- #include <stdio.h>
- ////////////////////////////////////////////////////////////
- int main()
- {
- int n = 32,
- nArr[99] = {10, 111, 2, 333};
- printf("size of nArr = %d\n", sizeof(nArr));
- for(int i = 0; i < 30; i = i + 1)
- {
- printf("nArr[%2d] = %3d\n", i, nArr[i]);
- }
- }
- */
- /*
- #include <stdio.h>
- int n = 32;
- int n2 = 11;
- int foo(int);
- ////////////////////////////////////////////////////////////
- int main()
- {
- n2 = n;
- printf("n2 = %d\n", n2);
- n2 = foo(8);
- printf("n2 = %d\n", n2);
- }
- ////////////////////////////////////////////////////////////
- int foo(int n3)
- {
- return 50 + n3;
- }
- */
- /*
- #include <stdio.h>
- extern int n;
- ////////////////////////////////////////////////////////////
- int main()
- {
- printf("n = %d", n);
- return 0;
- }
- int n = 32;
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement