Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- /////////////////////////////////////////
- void foo(char *p) //
- {
- printf("address of nArr[4] = %d\n", p);
- printf("address of nArr[3] = %d\n", &p[-1]);
- printf(" - - - - - - - -\n");
- }
- /////////////////////////////////////////
- int main() //
- {
- char nArr[5] = "SONY";
- foo(&nArr[2]);
- printf("address of nArr[4] = %d\n", &nArr[4]);
- printf("address of nArr[3] = %d\n", &nArr[3]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement