Question: Write a C program named lab2.c that implements the two functions NextPowerOfTwo() and WhichPowerOfTwo() described above. Requirements Your lab2.c program must meet the following requirements
Write a C program named lab2.c that implements the two functions NextPowerOfTwo() and WhichPowerOfTwo() described above. Requirements Your lab2.c program must meet the following requirements for full credit: 1. You must submit only a single file named lab2.c. 2. Your NextPowerOfTwo() function must accept an unsigned long int as input, return an unsigned long int, and use the bitwise left-shift operator <<. 3. Your WhichPowerOfTwo() function must accept an unsigned long int as input, return an int, and use the bitwise right-shift operator >>. 4. Your lab2.c program must #include only the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
