4 ms·
The 0x10 Best Advanced Questions for C Programmers
- Someone 15y agoAnswer to Q3 is incorrect. It should be d: - the function does not handle overflow (say x=1024, n=1024 in most if not all current C compilers) - worse, the function does not handle the case n<0. The "n<0 => function returns 1" case led me to rule out answers a, b, and c.