The program shows string length as 11. I was hoping to see as an 8, as variable "a" has been assigned a 64 bit value. When I pront the content of the string, the 1st 8B come out OK. But then it prints additional 3 bytes.
you are treating "a" as a null terminated char string, which is not. operator<< will stop reading it as string the first time if finds a zero-byte.
To do this sort of things, use unformatted output ( http://www.cplusplus.com/reference/iostream/ostream/write/ )