For simplicity, say each element takes 2B, and assume base address is 100.
element at address 100 = 10
element at address 102 = 20
element at address 104 = 30
element at address 106 = 40
element at address 108 = 50
element at address 110 = 60
NOTE: Confusion is commonplace here.
p points to 102, and q points to 110. BUT *p is 20 and *q is 60; which is NOT asked here.
q-p would be 110 - 102 = 8.
But each element is of 2B, so scale it down by a factor of 2.
=> 8/2
=> 4
You can simply think of it as how many places is q far apart from p.