C Programming Bit Manipulation Leetcode