#Ruby, 22 bytes
Ruby, 22 bytes
p [?a].pack(?p).size*8
["any string"].pack("p")
returns a string whose bytes correspond to the pointer that pointed towards "any string"
, and is 8 characters if the OS is 64-bit, or 4 characters if the OS is 32-bit.