Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int * foo(int n);
- int main()
- {
- int n = 8;
- int *p = foo( n);
- printf("%d -----,\n", *p);
- for (int i = n; i < 10; i++)
- {
- printf("%d ,", p[i-n]);
- }
- }
- int * foo(int n)
- {
- static int mas[10] = { 100,101,102,103,104,105,106,107,108, 109 };
- return &mas[n];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement