5 ms·
b). ++i increments i before the equality operation and is evaluated inline. PS why, are you having hiring difficulties or something?
by anigbrowl 14y ago
b). ++i increments i before the equality operation and is evaluated inline.
PS why, are you having hiring difficulties or something?
- dmk23 14y agoNot having any difficulties, just ran into this problem and thought it would be fun to share with HN. By the way your answer is wrong.
- elclanrs 14y agoHow come? b) seems correct in my book.
- zellio 14y agoB may seem like it is the "correct" answer, in so much as you are getting that out of your test programs. But because this code is undefined the functionality is compiler dependent and cannot be counted on. It is liable to change at a moment's notice and shouldn't make it into production code. The C spec doesn't handle this case. The only correct answer is undefined.