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