Certainly. What is stopping you? You want an array with [x % 10, x / 10 % 10, x / 100 % 10, ...] right? Is this a problem about finding the length of the array (e.g. want the array to start with the most significant digit)? You can use the fact that x has log10(x)+1 digits or that an integer can have at most 10 digits.