title: Trying To Program A Data Sorting Program with Pointers Arrays and Bubble Sort PLEASE ASSIST
body: <p>I am unsure of what to do next as these errors make no sense to me maybe I am doing something wrong which someone else can see. This has all the correct structure just I have wrong syntax. Any help is appreciated.</p>
  
  <p>Here is my code and this is how far I have gotten and when I try to compile I get these errors: </p>
  
  <pre><code>gcc Pointers.c
  
  Pointers.c:14: error: expected ‘)’ before ‘array’
  Pointers.c:32: error: expected ‘)’ before ‘array’
  Pointers.c:44: error: expected ‘)’ before ‘array’
  Pointers.c:56: error: expected ‘)’ before ‘array’
  Pointers.c:78: error: expected ‘)’ before ‘pointer’
  Pointers.c: In function ‘main’:
  Pointers.c:102: error: ‘array’ undeclared (first use in this function)
  Pointers.c:102: error: (Each undeclared identifier is reported only once
  Pointers.c:102: error: for each function it appears in.)
  Pointers.c:104: error: ‘pointer’ undeclared (first use in this function)
  </code></pre>
  
  <p>Here is the assignment page :<br>
  <a href="http://www.cs.miami.edu/~wuchtys/CSC322-13F/Assessment/LT5.html" rel="nofollow">http://www.cs.miami.edu/~wuchtys/CSC322-13F/Assessment/LT5.html</a></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  #define SIZE_OF_ARRAY 5
  
  //=============================================================================
  
      int *IntegerPtr;
      int  ArrayInt[SIZE_OF_ARRAY]; 
      int *ArrayPtr[SIZE_OF_ARRAY];
  
  //----------------------------------------------------------------------------- 
  /* Initializes the elements of an array of five integers to random integers 
   Initializes the elements of an array of five pointers to integers to point to the corresponding elements of the array of integers. */
  
  void ArrayInitialize(ArrayInt array,ArrayPtr pointer){
  
    int i;
    srand(getpid());
  
    for (i =0, int &lt; SIZE_OF_ARRAY; i++){
  
      array[i] = (int)rand()
  
    for (i =0, int &lt; SIZE_OF_ARRAY; i++){
  
          pointer[i] = &amp;array[i];
                                        }
                        }
      }
  
  //-----------------------------------------------------------------------------
  /*Have a function that prints an array of five integers*/
  
  void ArrayPrint(ArrayInt array){
   int i;
  
     for (i =0, int &lt; SIZE_OF_ARRAY; i++){
      printf("%d : %10d \n",i,array[i]);
  
   }
  printf("\n");
  }
  
  //-----------------------------------------------------------------------------
  /*Have a function that prints the integers pointed to by an array of five pointers to                                        integers.*/
  
  void ArrayPointerPrint(ArrayInt array){
   int i;
  
     for (i =0, int &lt; SIZE_OF_ARRAY; i++){
      printf("%d : %10d \n",i,pointer[i]);
  
   }
  printf("\n");
  }
  
  //-----------------------------------------------------------------------------
  /*Have a function that uses a bubble-sort to sort an array of five integers, in ascending order of the integers. */
  
  void ArrayBubbleSort(ArrayInt array){
  
    int i;
    int j;
    int temp;
  
    for( i = (SIZE_OF_ARRAY - 1); i &gt;= 0; i-- )
    {
      for( j = 1; j &lt;= i; j++ )
      {
        if( *(array+(j-1)) &gt; *(array+j))
        {
           temp = *array+(j-1));
          *array+(j-1)) = array+(j));
          *array+(j) = temp;
        }
      }
    }
  }
  
  //-----------------------------------------------------------------------------
  /*Have a function that uses a bubble-sort to sort an array of five pointers to integers */
   void PointerBubbleSort(ArrayPtr pointer){
  
    int i;
    int j;
    int temp;
  
    for( i = (SIZE_OF_ARRAY - 1); i &gt;= 0; i-- )
    {
      for( j = 1; j &lt;= i; j++ )
      {
        if( *(pointer+(j-1)) &gt; *(pointer+j))
        {
          temp = *pointer+(j-1));
          *pointer+(j-1)) = pointer+(j));
          *pointer+(j) = temp;
        }
      }
    }
  }
  
  //----------------------------------------------------------------------------- 
  
   int main(void) {
  
      array[SIZE_OF_ARRAY]; 
  
      pointer[SIZE_OF_ARRAY];
  
      ArrayInitialize(array,pointer);
  
      ArrayPrint(array);
  
      PointerBubbleSort(pointer);
  
      ArrayPointerPrint(pointer);
  
      ArrayBubbleSort(array);
  
      ArrayPrint(array);
  
      ArrayPointerPrint(pointer);
  
      return(EXIT_SUCCESS);
  
    }
  </code></pre>