Dsa
Bit Manipulation
Easy
Kth Bit Set
Given an integer N and an integer K (1-based), determine if the K-th bit (from the right) in the binary representation of N is set (i.e., equals to 1). Print 'SET' if the bit is set, otherwise print 'NOT SET'.
Example:
Input:
5 1
Output:
SET
Key concepts
bit_manipulationbit_testing
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