Convert Integer to String in Given Base
Implement a function that converts an integer to its string representation in a specified base (e.g., base 10 for decimal, base 16 for hexadecimal, base 2 for binary). The function should take an integer and a base value as parameters and return the converted string.
Asked at:
Microsoft
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early October, 2025
Microsoft
Mid-level
int_to_string(26, 10) -> "26" int_to_string(26, 16) -> "1A" int_to_string(26, 2) -> "0010" (or whatever the correct binary conversion is).
Hello Interview Premium
Your account is free and you can post anonymously if you choose.