Skip to main content
Commonmark migration
Source Link

#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.

#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.

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.

Source Link
Value Ink
  • 12.6k
  • 1
  • 17
  • 42

#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.