该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
这是我未写完的代码:
#include
#include
#include
char mac[12],mac_2[12][4];
char *pmac,*pmac_2;
char *putmac (char *);
void check (char *);
//
main()
{
putmac(pmac);
printf("%s\n",mac);
getche();
return 0;
}
//
char *putmac (char *p)
{
&mac[0]=*p;
printf ("\nEnter the MAC : ");
scanf ("%s",&mac);
check (mac);
printf ("\nThe MAC your type is %s\n",mac);
return p;
}
//
void check (char *p)
{
p=&mac[0];
int i;
if (strlen(*pmac)!=12)
{
printf("\nTYPE ERRNO!\n");
putmac();
}
else
for (i=0;i<12;i++)
{
if (mac[i]>='0'&&mac[i]<='9'||mac[i]>='A'&&mac[i]<='F'||mac[i]>='a'&&mac[i]<='f')
continue;
else
{
printf("\nTYPE ERRNO!\n");
putmac();
}
}
return ;
}
请高手们帮我指点�