Write a function which takes a C string as an input and counts the number of non
ID: 3648194 • Letter: W
Question
Write a function which takes a C string as an input and counts the number of non-alphabetic characters in the C string. Non-alphabetic characters include anything outside the ranges 'a' thru 'z' and 'A' thru 'Z'. Do not count the null terminator. You are not allowed to use any other functions to do this. Do not write a main function. Your function does not do any cin or cout. Remember, C strings are terminated with the '' character. Make sure to properly format all your code.Explanation / Answer
int count(char string[]) { int i,c; i=0;c=0; while(string[i]!='') { if(((string[i]>=65&&string[i]=97&&string[i]Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.