求帮忙看看问题出在哪里?
一直没搞明白,问题错在哪里了呢?
#include <stdio.h>#include <string.h>int strlen(char s[]){ int i; i = 0; while(s[i] != '\0') ++i; return i;}main(){ int i, c; char a[100]; i = 0; while(c=getchar() != '\n') { a[i] = c; ++i; } printf("本字符串个数为: %d",a);}