Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int* foo(int v);
- ///////////////////////////////////////////////////////// printf("%d ,", p[-1]);
- int main() {
- int c = 5;
- int* p = foo(c);
- for (int i = 0; i < 10; i++)
- {
- if (p[i] % 2 != 0)
- {
- printf("%d ,", p[i - c]);
- }
- }
- }
- ///////////////////////////////////////////////////////
- int* foo(int v)
- {
- static int mas[10]{ 102,103,125,132,135,144,151,154,159,162 };
- return &mas[v];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement