/* write a function int count_letter(char s[]) that has one parameter string of chars function returns the total number of letters (upper and case and lower case) in the string write main to test the function */ #include #include #define SIZE 20 int count_letter(char s[]); int count_letter1(char s[]); int main(){ char s[SIZE]; printf("enter string\n"); scanf("%s", s); printf("number of letters is %d\n", count_letter(s)); printf("number of letters is %d\n", count_letter1(s)); return 1; } int count_letter(char s[]){ int i=0, count=0; while(s[i]!='\0'){ if((s[i]>='a' && s[i]<='z') || (s[i]>='A' && s[i]<='Z')) count++; i++; } return count; } int count_letter1(char s[]){ int i, count=0,len=strlen(s); for(i=0;i='a' && s[i]<='z') || (s[i]>='A' && s[i]<='Z')) count++; } return count; }