Question bank › Math
Dsa Math Easy

Count Digits in Integer

Write a program that counts the number of digits in a given integer n. Consider the absolute value of n for counting. Input Format: - A single integer n (-10^9 ≤ n ≤ 10^9). Output Format: - A single integer which is the count of digits in n. Example: Input: -12345 Output: 5

Key concepts

digitscountingmath

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 Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.