In this case
a is the
5th integer in the array
ap is a pointer to integer, so you are assigning an integer to a pointer and that’s the warning.
ap now holds
45 and when you try to de-reference it (by doing
*ap) you are trying to access a memory at address 45, which is an invalid address, so your program crashes.
You should do
ap = &(a); or
ap = a + 4;
c array names decays to pointer, so
a points to the 1st element of the array.
In this way,
a is equivalent to