求帮忙看看有关问题出在哪里

求帮忙看看问题出在哪里?一直没搞明白,问题错在哪里了呢?C/C++ code#include stdio.h#include string.h

求帮忙看看问题出在哪里?
一直没搞明白,问题错在哪里了呢?

C/C++ code
#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);}




[解决办法]
printf("本字符串个数为: %d",a); // a 改为 strlen(a)

[解决办法]
printf("本字符串个数为: %d",a); 逗号搞成了中文的。