Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include<stdio.h>
  2. int main(void) {
  3. int *p, *q, i, v[2], *pv;
  4. void *qv;
  5. char R[]="ABCDEFGHI", *S;
  6. p = &i;
  7. *p = 5;
  8. q = p;
  9. p++;
  10. (*q)++;
  11. printf("%d %d %d\n", i, p - q, (int)p - (int)q);
  12. v[0] = 0; v[1] = 1;
  13. pv = v;
  14. pv++;
  15. *(pv) = *(v + 1) + 1;
  16. printf("%d %d\n", v[0], v[1]);
  17. qv = pv - 1;
  18. qv = qv + 1;
  19. *(int*)qv = 1;
  20. printf("%d %d\n", v[0], v[1]);
  21. S = R;
  22. while (*(S++) != ’\0’) *(S - 1) = *S;
  23. printf("<%s|%s>\n", R, S);
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement