← Questions

Parse a signed integer in any base, with overflow checks

0
MicrosoftCodingLast asked Aug 2026

A coding interview question asked in Microsoft's technical phone screen, last asked Aug 2026. It tests parsing, strings and overflow.

Write a production-quality parser that turns a string into a signed 32-bit integer in a given base. Every outcome is explicit: a valid value, invalid input, or a value that does not fit in 32 bits.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

parsing · strings · overflow

Your code and the AI tutor open when you unlock this question.