Question: Write a C function equal_halfs that takes a uint16_t as a parameter and returns 0 if the first half of the parameter value is not
Write a C function equal_halfs that takes a uint16_t as a parameter and returns 0 if the first half of the parameter value is not the same as the second half of the parameter value, and returns a non-zero value if they are the same. For example, equal_halfs(0x2324) should return 0 and equal_halfs(0x2424) should return any non-zero value.
Note the tester has command line options -Wall -Wextra -Werror -fsanitize=address to help you catch errors.

1 Exit Full Screen code.c + New 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
