Double type variables take 8 bytes storage.In the following example when pointer is incremented first time it moves 8 bytes forward but it is incremented 2nd time it moves 4 bytes forward...The question is that why 2nd time it moves 4 bytes instead of 8 bytes forward.
I doubt any compiler would compile that incorrectly. That would be a pretty huge/disasterous bug that would have been quickly exposed and fixed.
What is the actual output you are getting?
I used MSVC++ 2010 express.
And while we're on the subject: DevC++ is ancient and decrepit. You shouldn't be using it. You're also using pre-standard code that shouldn't compile in modern compilers. You should throw away whatever book/source you're learning from and pick up something more recent.