Why can't i add pointers in C and dereference their sum?

Viewed 67

p1 and p2 are both intpointers. My current understanding is that by adding two pointers addresses you get a new address, which you would be able to dereference with "*". So why can't i use this expression?

int foo =  *(p1 + p2);
0 Answers
Related