Question bank › Strings
Dsa Strings Easy

Count Upper and Lower Case Letters

Write a function that counts the number of uppercase and lowercase letters in a given string. Ignore numbers, spaces, and punctuation marks. Input format: - A single line containing the string to analyze. Output format: - Two comma-separated integers: the count of uppercase letters followed by the count of lowercase letters. Example: Input: Hello World 123! Output: 2,8

Key concepts

stringscountingcase

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.