函数调用
为啥运行的结果总是1。求解!!!#include<stdio.h>
#define ENDSTRING '\0'
extern int StrLen(char* str);
int main (void)
{
char src[]="Hello Dymatic ";
printf("string length is : %d\n",StrLen(src));
return 0;
}
int StrLen( char *string)
{
int len = 0;
while(*string++ != 'ENDSTRING);
len++;
return len;
}