B 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.