title: How can I convert a long long into an array in C?
body: <p>I would like to convert an integer into an array. My goal is to be able to take a long long, for example <code>123456789...</code>, and make an array in which each digit holds one spot, like this <code>{1, 2, 3, 4, 5, 6, 7, 8, 9, ...}</code>.</p>
  
  <p>I can't use <code>iota()</code> because I am not allowed to, and I don't want to use <code>snprintf</code> because I don't want to print the array. I just want to make it.</p>
  
  <p>After thinking about it for awhile, the only solution I thought of was to </p>
  
  <ol>
  <li>Create a loop to divide the number by ten for each digit, leaving the quotient as an int</li>
  <li>Let the decimals of the quotient go away via the restrictions of the int data type</li>
  <li>Make a for loop to decrement the number until it becomes divisible by ten, all while incrementing a counter <code>i</code></li>
  <li>Let the <code>i</code> effectively become the digit and pass it into the array </li>
  </ol>
  
  <p>But I feel like I am making this extremely overcomplicated, and there must be a simpler way to do this. So, have I answered my own question or is there and easier way?</p>