Code:
#include <stdio.h>
#include <stdlib.h>
  void bubblesort(int a[],int n);
   
   int main()
{
    
    int comp, pass, tmp, n;
    int a[];
    pass = 1;
    while(comp <= n - pass)
     {
        if(a[comp-1] > a[comp])
         {
            tmp = a[comp-1]; 
            a[comp-1] = a[comp]; 
            a[comp] = tmp;
         }
        comp = comp + 1;
     }
    pass = pass + 1;
    system("pause");
    return 0;  
}
is what i have so far and it tells me that:
array size missing in 'a'

also im having trouble understanding the homework

Write two functions, both accepts two arguments, an integer array: a and an integer: n. The first function outputs the n elements stored

in the array, and the second function sorted the array using the basic bubble sort as provided in the notes with an improvement. The

improvement is based on the following observation. When there is no exchange between any data in a pass of the bubble sort, the sequence

is already sorted in non-decreasing order. As a result, there is no need to continue and hence can terminate the sort. Add an output

statement to show the number of passes that the sorting algorithm has actually taken.

Then write a C program to test your solution. It first requests n, the number of integers to be sorted. Then it input n integers. Then

it calls the output function to output the original sequence of integers, then calls the bubble sort, and finally calls the output

function to output the final sorted sequence.

can anyone explain this more clearly for me?

thank you!