Guest User

Untitled

a guest
Jun 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. struct str {int x; int y;};
  2. int a[5] = {1, 2, 3, 4, 5};
  3. int *p1, *p2;
  4. str s;
  5. p1 = &a[N%5+1]; //первая строка таблицы
  6. p2 = a+N/5+1; //2-я строка
  7. s.x = *p1; //3-я строка
  8. s.y = *p2++; //4-я строка
  9. *(p1-2)=s.y; //5-я строка
  10. p2=&s; //6-я строка
  11. p2->x=p1[1]; //7-я строка
  12. p2–>y=s.y; //8-я строка
  13. a[5]=s.x; //9-я строка
Add Comment
Please, Sign In to add comment