Question bank › Bit Manipulation
Dsa Bit Manipulation Easy

Check Bits in Range

Write a program that checks if all bits in a given range (inclusive) are set to 1 in a provided integer. The program should read an integer, a start index, and an end index from standard input, then print 'Yes' if all bits in the range are set, and 'No' otherwise. Example: Input: 15 1 3 Output: Yes

Key concepts

bit manipulationrange checks

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.