When I use hexdump directly, the output is in the form of two-byte sets, but when I use the -C option, I find that the output order has changed.
$hexdump -x a.out
0000000 652f 6374 702f 7361 7773 0a64
$hexdump -C a.out
0000000 2f 65 74 63 2f 70 61 73 73 77 64 0a ....
My assumption is that the address of 2f is 0000000, the address of 65 is 0000001, and the address of 74 is 0000002... Is it right?
Yes, that is correct.
-x
will display the data big-endian (assume it's a two byte object and reverse them at least on my little-endian host)
$ echo -n "ab" | hexdump -x | head -1
0000000 6261
-C
will dump the data as is:
$ echo -n "ab" | hexdump -C | head -1
00000000 61 62 |ab|