← Qualcomm questions

Set or unset the kth bit of a number

Filed under Qualcomm

Given an integer n and an integer k, write functions to set the k-th bit (make it 1) and unset the k-th bit (make it 0) of n using bitwise operations.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Qualcomm questions

Collected from public candidate posts and coding forums. Updated Nov 2026.