Some basic C programming questions. Write a program to handle an operation for a microcontroller.
Implement apply_register_operation(register_value, operation, bit) for a 32-bit register. The operation is set, clear, toggle, or read; return the updated register for the first three and the selected bit value, 0 or 1, for read.
register_value is an integer from 0 through 2^32 - 1, operation is a valid operation string, and bit is an integer from 0 through 31. Bit 0 is the least significant bit.
def apply_register_operation(register_value, operation, bit):