So it increments the pointer, then dereferences. By incrementing, it is in this case now pointing at a[2]. Dereferencing should return a 6 at this point.
Like all other C++ operators, ++ returns a value:-
If ++ precedes the variable, e.g. ++counter, the value returned is the value in counter after it has been incremented.
If ++ follows the variable, e.g. counter++, the value returned is the value in counter before it has been incremented.