Skip to main content
added 109 characters in body
Source Link
nwellnhof
  • 10.6k
  • 1
  • 19
  • 38

C (gcc) / POSIX, 26 bytes

f(s){s=inet_pton(2,s,&s);}

Try it online!

Works as 64-bit code on TIO but probably requires that sizeof(int) == sizeof(char*) on other platforms.

C (gcc), 26 bytes

f(s){s=inet_pton(2,s,&s);}

Try it online!

C (gcc) / POSIX, 26 bytes

f(s){s=inet_pton(2,s,&s);}

Try it online!

Works as 64-bit code on TIO but probably requires that sizeof(int) == sizeof(char*) on other platforms.

Source Link
nwellnhof
  • 10.6k
  • 1
  • 19
  • 38

C (gcc), 26 bytes

f(s){s=inet_pton(2,s,&s);}

Try it online!