#include <iostream>
using namespace std;
bool klsb(int num, int k) {
return (num & (1<<(k-1)));
}
int main() {
int t;
scanf("%d",&t);
while(t--) {
int num,k;
scanf("%d%d",&num, &k);
cout<< klsb(num,k)<< endl;
}
}
In the above code, what does
return (num & (1<<(k-1)));
mean?