[Pointers and C-String]D. Liang 7.11 Counting the letters in a string
Description:
Write a function that counts the number of letters in the string using the following header:
int countLetters(const char * const str);
Hint:
Don’t submit the main() function.
Programme:
//Date:2020/5/18
//Author:Kamenrider Justice
int countLetters(const char * const str)
{
int length,i,count=0;
length=strlen(str);
for(i=0;i<length;i++)
{
if(isalpha(str[i]))
{
count++;
}
}
return count;
}
Python大数据搜索