先把所有字符读入,再判断ip和子网是否符合规则 #include<stdio.h> int ip_judge(charip, intp){ int one[4]; int i=0; memset(one, -1, sizeof(int)*4); for(;ip[*p]!='~';(*p)++){ int number_exist =0; int number = 0; for(;ip[*p] != '.' && ip[*p] != '~';(*p)++){ int aa = *p; char bb = ip[*...