Question: Write a function in C that does a left bit rotation. Hint: Reuse code - a left rotation by n bits results in the same
Write a function in C that does a left bit rotation. Hint: Reuse code - a left rotation by n bits results in the same value as a right rotation by 16 n bits, assuming 2-byte shorts. unsigned short leftrot(unsigned short wrd, int numbits) {
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
