D 2009-12-29T18:16:42 J +comment \n\n
rwilson\sadded\son\s2009-12-29\s18:16:42:
\ni\sthink\syou\sare\scorrect.\s\sit\sshould\sbe\si.\s\sas\sis,\sthis\scode\swill\salways\sreturn\sthe\sfirst\stwo\schars\sof\sthe\sip\saddress.\r\n\r\n
\r\nstatic\schar\s*ipPrefix(const\schar\s*zIP){\r\n\s\sint\si,\sj;\r\n\s\sfor(i=j=0;\szIP[i];\si++){\r\n\s\s\s\sif(\szIP[i]=='.'\s){\r\n\s\s\s\s\s\sj++;\r\n\s\s\s\s\s\sif(\sj==2\s)\sbreak;\r\n\s\s\s\s}\r\n\s\s}\r\n\s\sreturn\smprintf("%.*s",\sj,\szIP);\r\n}\r\n
J resolution Open K a09798ba9e285df66543f60344e7109fe6ac125c U rwilson Z 990324249cec759986e1ff66a87b3843