Put another way, see where you increment p, like this: ...<<'\t'<<*(++p);
That changes the pointer p, so that it points not at the start of the array, but at the second element (i.e. p[0] becomes 4 when ++p is processed, and thus p[1] is 6, p[2] is 8 and p[3] is 10. Clealy, ++p is being processed before p[3] in the line cout<<p[3]<<'\t'<<*(++p);
As a rule of thumb, do not do anything in a cout chain that alters values. It may not work in the order that you expect.
In other news, this: void main() has not been valid C++ for a long time. Whatever compiler you're using is very old and you will learn non-standard C++.
It could be 8 or it could be 10. In the line cout<<p[3]<<'\t'<<*(++p); when is ++p carried out, before or after p[3]? You should never read and write to the same variable in a single expression, the result is undefined.
To strengthen Moschops's generaly correct answer, it's not just a "rule of a thumb".
The expression "cout<<p[3]<<'\t'<<*(++p);" is explicitly undefined in C++. It is an error to attempt to evaluate it. The subexpressions p[3] and ++p may be evaluated in any order or even simultaneously, which means when evaluating p[3], the value of p may be the one before ++p, the one after ++p, or in process of being modified by ++p. The compiler is within its legal rights to crash and burn and not as much as warn you, just like it is when you're accessing an array out of bounds.
In practice, all compilers that permit this code to compile do produce some output, and I'm willing to bet it's always 8 or 10, but it is not predictable which one will be produced. It varies compiler to compiler, platform to platform, version to version.
Here's a few tests:
GCC 4.6.2/linux: 30 10 4
GCC 3.4.6/sparc: 30 8 4
Intel 11.1/linux: 30 8 4
Clang++ 2.9/linux: 30 8 4
Visual Studio 2010/windows: 30 10 4
Sun Studio 5.8/sparc: 30 10 4