Find value of k | C # program to find k - th bit from right ; Driver Code ; Function Call
using System ; class GFG { static void printKthBit ( long n , long k ) { Console . WriteLine ( ( n & ( 1 << ( k - 1 ) ) ) >> ( k - 1 ) ) ; } public static void Main ( ) { long n = 13 , k = 2 ; printKthBit ( n , k ) ; } }