check if kth bit is set or not code
#include <iostream>
using namespace std;
//! Using LeftShift Operator
void kthBit(int n, int k)
{
if (n & (1 << k - 1) != 0)
{
cout << "Yes" << endl;
}
else
{
cout << "No" << endl;
}
}
int main()
{
int n, k;
cin >> n >> k;
kthBit(n, k);
return 0;
}