✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
We can replace the function foo below by an equivalent one-line C function. Which one?
uint32_t foo(uint32_t a, uint32_t b) {
uint32_t r=0;
for (int i=0; i<32; i++) {
r = r | ((((a >> i) & 1) != ((b >> i) & 1)) << i);
}
return r;
}