← Microsoft questions
CodingReported in a candidate post, Jul 2018

Convert string to integer with edge cases

Filed under Microsoft

Implement the atoi function, which converts a string to a 32-bit signed integer. The function first discards leading whitespace characters, takes an optional sign, and reads until the next non-digit…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.