Check If Kth Bit Is Set/Unset

In this lesson, we try to find a bit in the binary representation of a number at the kth position and check if it is set/un-set.


In this question, input a number and check if the kthk^{th} bit is set or not.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.