I am learning C programming language, I have just started learning arrays with pointers. I have problem in this question, I hope the that output must be
It's because the size of char is one, and the size of int is four. This means that adding 4 to ptr makes the result point to the second entry in the int array.
If you compiled this on a big endian system you would have printed 33554432 instead.