The interviewer sprung a surprise - wanted to check my C coding readiness. Are they hurting so much for coders ?
What ? Why ? Limitations?
unsigned int funct_2(unsigned short a, unsigned short b)
{
unsigned int result = 0;
while (b) {
if (b & 0x1) {
result += a;
}
a <<= 1;
b >>= 1;
}
return result;
}