Topic: Bit Manipulation Problem / Level: beginner

Problem: Write a function to set all the bits of a given number from LSB to the ith bit.

Run the code to see the output here...