关于指针
#include <string.h>#define n 80
char *strblk (char *string);
int main (void)
{
char str1[n];
*strblk(str1);
puts (str1);
return 0;
}
char *strblk (char *string)
{
gets (string);
int i = 0;
while(*(string + i) != '\0')
{
if(*(string + i) != ' ')
*(string + i)= '\0';
else if(*(string + i) != '\n')
*(string + i)= '\0';
else if(*(string + i) != '\t')
*(string + i)= '\0';
i++;
}
return string;
}请问逻辑上有什么问题吗?