Generation

generate functionWed, 30 Nov 2022

You are given a number in binary form. You have to print the number in decimal form after rightmost set bit

int num = 10101010; //Binary Number int lastSetBit = getLastSetBit(num); print(num & ~(1 << lastSetBit));

Want to kickstart your project?Use the new AI Studio to create your code