Answered You can hire a professional tutor to get the answer.

QUESTION

Write a C function hwkl a, that takes a long int x as argument as well as two integers n and m, and returns a long int. Here is the function...

please i need help with this question,, C language thank you

A: Write a C function hwkl a, that takes a long int x as argument as well as twointegers n and m, and returns a long int. Here is the function declaration: long int hwkla (long int x, int n, int m); The function should swap byte n and m of a long int x (64-bit integer). A byte isan eight-bit aggregation. For this problem the index of the least significant byteis 0, and the index of the most significant byte 7 (so 0 <= m, n <= 7). So, if x= 0x0123456789ABCDEF (a 64-bit integer), and if you swap two bytes say thatare at the 3rd and 5th index, x would now be x=0x0123 896745ABCDEF. You are not allowed to use division, multiplication, or modulus,relative comparisons (<, >, <=, >=), loops, switches, function calls, macros,conditionals (if or ‘22) You are allowed to use all bit level and logic operations, left and right shifts,addition and subtraction, equality and inequality tests, integer constants (<=255),INT_MIN and INT_MAX, and casting between data types. (20 points).
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question