Question: how to find lsb and msb in c?
Answer: To check LSB of a number we need to perform bitwise AND operation. Get input number from the user, store it in a variable say “num”. Get the size of bits using the sizeof operator to represent the value in memory. Extract the MSB of the number, using left shift operator and store value in a variable say “msb”.