I'm afraid what you observe is only a part of the iceberg. It's probably not as simple as "reversed".
The real mechanism, I believe, is the following:
you read data into memory in char, i.e. byte, 8 bits. You memory is byte addressed. Then you do a type cast when outputing the values in the vector. The new type is int, i.e. 32 bit (might not be true on all machines, but very likely to be true). So you program is outputing four bytes of binary values at a time.
As to reversing the observed 87 into 78, you might want to look into your program and find out the real reason. Simply doing a reverse is easy, but you need a good reason to support your reverse.
Because no one mentioned it yet, if it is endianness, it would not become 87 --> 78. If that is what's happening, than it is not endianess. It would do more of the following style:
1 2
00 00 00 87 //before
87 00 00 00 //after
In that particular case, it would go from a positive value very close to 0, to more then halfway to the max negative value.