title: read file of 10 lines of integer, put them in a array, and output the array
body: <ol>
  <li><p>In this program, i want to let user to input 2 arguments, the number 
        of integer,and the file name. </p>
  
  <ol>
  <li>the file has 10 lines of integer value. </li>
  <li>read the file, and put it to inArray[];</li>
  <li><p>and then output it as the end;</p>
  
  <p>notes: For the complete program, i want to make a program that 
        will scan a file consists of random integer,and then sort 
        them in ascend order, and print out the first 10 percent
         of the sorted integer. </p>
  
  <p>Error: For now, i want to test if it can read the file and put values
        into the inArray properly, but its keep getting errors. </p>
  
  <pre><code>  warning: initialization makes integer from pointer without a cast
     findTotal.c:43:6: warning: passing argument 1 of ‘fopen’
                 makes pointer from integer without a cast
    /usr/include/stdio.h:271:14: note: expected ‘const 
     char * __restrict__’ but argument is of type ‘char’
  </code></pre></li>
  </ol></li>
  </ol>
  
  <p>Please help me with this, thank you</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;stdlib.h&gt;
  
  
  int main(int argc, char *argv[]){
  
   int numOfInt;
   char fileName="";
  
   sscanf(argv[1],"%d",&amp;numOfInt);
   sscanf(argv[2],"%c",&amp;fileName);
  
   int i, rc;
  
   /* the origninal list , initialise as 0 index*/
   int inArray[numOfInt];
  
   /* the number of output int  */
   int outNumInt = numOfInt * 0.1;
  
   /*  the output array of int  */
   int outArray[outNumInt];
  
  
   FILE *inFile;
   inFile = fopen(fileName,"r");
  
   /*      check if the file is empty      */
   if(inFile==NULL){
      printf("can not open the file");
   }
  
   for (i = 0; (rc = getc(inFile)) != EOF &amp;&amp; i &lt; numOfInt; inArray[i++] = rc) 
   { 
  
  
   }//for
  
   fclose(inFile);
  
   for(i = 0; i &lt; numOfInt;i++){
  
      printf("%x\n",inArray[i]);
   }
  
  
  
  }//main
  </code></pre>