105. Strings and Character Handling-ii

Question.5

A developer counts uppercase letters in a string using pointer walking:

int count_upper(const char *s) {
   int count = 0;
   while (*s) {
       if (*s >= 'A' && *s <= 'Z') count++;
       s++;
   }
   return count;
}

printf("%d", count_upper("FW v3.2-RC1"));

What is the output?

Need Help? Refer to the Quick Guide below

Select Answer