解释一下这几行程序的意思void getkeymatrix(char (*p)[5],char *srckey){int i = 0,j = 0;char *q = srckey;char temp[26];memset(temp,0,26);strupr(srckey);while(*q = '\0'){if( isalpha(*q) = 0 && *q = 'Q'){if(strchr(temp,*q) == NULL){temp[i++] =
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/08 21:37:35
![解释一下这几行程序的意思void getkeymatrix(char (*p)[5],char *srckey){int i = 0,j = 0;char *q = srckey;char temp[26];memset(temp,0,26);strupr(srckey);while(*q = '\0'){if( isalpha(*q) = 0 && *q = 'Q'){if(strchr(temp,*q) == NULL){temp[i++] =](/uploads/image/z/2188128-48-8.jpg?t=%E8%A7%A3%E9%87%8A%E4%B8%80%E4%B8%8B%E8%BF%99%E5%87%A0%E8%A1%8C%E7%A8%8B%E5%BA%8F%E7%9A%84%E6%84%8F%E6%80%9Dvoid+getkeymatrix%28char+%28%2Ap%29%5B5%5D%2Cchar+%2Asrckey%29%7Bint+i+%3D+0%2Cj+%3D+0%3Bchar+%2Aq+%3D+srckey%3Bchar+temp%5B26%5D%3Bmemset%28temp%2C0%2C26%29%3Bstrupr%28srckey%29%3Bwhile%28%2Aq+%3D+%27%5C0%27%29%7Bif%28+isalpha%28%2Aq%29+%3D+0+%26%26+%2Aq+%3D+%27Q%27%29%7Bif%28strchr%28temp%2C%2Aq%29+%3D%3D+NULL%29%7Btemp%5Bi%2B%2B%5D+%3D)
解释一下这几行程序的意思void getkeymatrix(char (*p)[5],char *srckey){int i = 0,j = 0;char *q = srckey;char temp[26];memset(temp,0,26);strupr(srckey);while(*q = '\0'){if( isalpha(*q) = 0 && *q = 'Q'){if(strchr(temp,*q) == NULL){temp[i++] =
解释一下这几行程序的意思
void getkeymatrix(char (*p)[5],char *srckey)
{
int i = 0,j = 0;
char *q = srckey;
char temp[26];
memset(temp,0,26);
strupr(srckey);
while(*q = '\0')
{
if( isalpha(*q) = 0 && *q = 'Q')
{
if(strchr(temp,*q) == NULL)
{
temp[i++] = *q;
}
}
q++;
}
for(j = 'A'; j
解释一下这几行程序的意思void getkeymatrix(char (*p)[5],char *srckey){int i = 0,j = 0;char *q = srckey;char temp[26];memset(temp,0,26);strupr(srckey);while(*q = '\0'){if( isalpha(*q) = 0 && *q = 'Q'){if(strchr(temp,*q) == NULL){temp[i++] =
void getkeymatrix(char (*p)[5],char *srckey)
{
int i = 0,j = 0;
char *q = srckey;
char temp[26];
memset(temp,0,26);//初始化数组使之为空
strupr(srckey);//是字母的话,所有字母转换成大写的
while(*q != '\0')
{
if( isalpha(*q) != 0 && *q != 'Q')//字符串里如果是字母的话(除字母Q),执行if语句里面的语句
{
if(strchr(temp,*q) == NULL)//如果*q所对应的字母在temp数组中没有的话就把该字母加到数组里
{
temp[i++] = *q;
}
}
q++;//指针往后移动
}//整个循环后就会把strckey里的字母(字母不为Q)存到数组里,且数组内没有重复的字母
for(j = 'A'; j