The relevant parts of the code is this:
printf ("\nHere's the serv_addr buffer:\n");
b = (unsigned char *) &serv_addr;
for (i = 0; i != sizeof (serv_addr); i++)
printf ("%s%02x", (i != 0) ? " " : "", b[i]);
What it is doing is simply printing the raw data from the structure serv_addr (which is of type struct sockaddr_in).
There's no "string" here (in the sense of a C null-terminated byte string).
The 0x1388 is the value of serv_addr.sin_port, which is printed as the third and fourth byte (13 and 88, in network (big endian) byte order).
Knowing that the output is the raw data of a sockaddr_in structure, we can decipher the data easily
02 00 This is the sin_family member, with the value 2 (decimal). This value corresponds to AF_INET. This is in host byte order.
13 88 This is (as already mentioned) the network byte order of the port in sin_port.
7f 00 00 01 This is the sin_addr member, and corresponds to the IP address 127.0.0.1 (7f is 127). This is also in network byte order.
The rest, 30 30 30 30 30 30 30 30, is "garbage" that fills the structure up to a common size for struct sockaddr, which is 16 bytes long.