Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int a[12][22];
- void foo(int &bhoewsg);
- ///////////////////////////////////////////////////////
- int main()
- {
- int mas[100] = { 1, 253, 6363, 3412, 42 };
- for (int i = 0; i < 5; i++)
- {
- printf("%5d ", mas[i]);
- }
- foo(mas[2]);
- }
- /////////////////////////////////////////////////////////
- void foo(int &mas) //
- {
- int *p = &mas;
- printf("\n%5d", *(p - 2));
- printf("\n%5d", p[- 1]);
- printf("\n%5d", mas);
- printf("\n%5d", *(p + 1));
- printf("\n%5d", p[2] );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement