LogiQuest
Back to Strings
19

What will be the output of the program?

#include <stdio.h>
#include <ctype.h>

int main(void) {
    char s[] = "HeLLo";
    int i, up = 0;
    for (i = 0; s[i]; i++) if (isupper((unsigned char)s[i])) up++;
    printf("%d\n", up);
    return 0;
}
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.