title: Simple C program produces Blank Ouput - No Errors
body: <p>I have a C program, which converts an input integer number, into the equivalent string, a character array. For example the integer 245 should be '2', '4', '5', '\0'. And the integer -493 should be '-', '4', '9', '3', '\0'. 
  It is the exercise 14, of Chapter 10, in the book: Programming in C (third edition), by Stephen Kochan.
  My code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main ( void ){
  
  int integer = 245;
  
  const char stringIntegers[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
  int i = 0, j = 0;
  char tempInt[10], stringInt[10];
  
  
  // Checks whether the input integer is negative in order to store a '-', in [0] of the output string
  if ( integer &lt; 0 ){
      stringInt[0] = '-';
      j = 1;
      integer = -integer;
  }
  
  // extract digits of the input integer and store them, in opposite order (last to first digit), in temporary string
  while ( integer ){
      tempInt[i] = stringIntegers[integer % 10];
      integer /= 10;
      ++i;
  }
  
  // now store them in the right order to output string
  for( --i; i &lt; 0; ++j, --i )
      stringInt[j] = tempInt[i];
  
  // Finally, copy the null zero terminator to output string
  stringInt[j] = '\0';
  
  
  printf("%s\n", stringInt );
  
  return 0;
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Process returned 0 (0x0)   execution time : 0.014 s Press any key to
  continue.
  </code></pre>
  
  <p>As you can see the output is blank. Compiler shows no errors, or warnings. This means that I must have some kind of logical error, but I have checked my code to the letter and I can't find a logical error. Except if it is an other kind of error like a definition of a string variable, an array (or such stuff that confuse me a bit). If anyone could help me, I would be most grateful. Thank you in advance.</p>