Remainder When N divided by 2^M Write the shortest code to find the remainder when an input number N is divided by 2^M. You cannot use /,* and % operator.

Input Specification
Number of test cases followed by a pair of integers on each line.

Sample Input
1
150 6

Sample Output
22

Limits
1&lt;T&lt;1000
1&lt;N&lt;2^31
1&lt;B&lt;31

Time Limit
1 Sec
scanf("%d", &amp;T);
while(T--){
   scanf("%d,%d", &amp;N,&amp;M);
   printf("%d",N&amp;~(~0 &lt;&lt; M));
}