Advertisement
Guest User

inkrementi

a guest
May 27th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. ptr++; // Pointer moves to the next int position (as if it was an array)
  2. ++ptr; // Pointer moves to the next int position (as if it was an array)
  3. ++*ptr; // The value of ptr is incremented
  4. ++(*ptr); // The value of ptr is incremented
  5. ++*(ptr); // The value of ptr is incremented
  6. *ptr++; // Pointer moves to the next int position (as if it was an array). But returns the old content
  7. (*ptr)++; // The value of ptr is incremented
  8. *(ptr)++; // Pointer moves to the next int position (as if it was an array). But returns the old content
  9. *++ptr; // Pointer moves to the next int position, and then get's accessed, with your code, segfault
  10. *(++ptr); // Pointer moves to the next int position, and then get's accessed, with your code, segfault
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement