Position of rightmost different bit | C ++ implementation to find the position of rightmost different bit in two number . ; function to find rightmost different bit in two numbers . ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int posOfRightMostDiffBit ( int m , int n ) { return ffs ( m ^ n ) ; } int main ( ) { int m = 52 , n = 4 ; cout << " Position ▁ = ▁ " << posOfRightMostDiffBit ( m , n ) ; return 0 ; }