#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
bool prim(int* A, int n) // function declaration must be before "main"
{
int i, j;
for(i=2; i<n; i++)
{
A[i] = true;
for(j=i; j<n; j++)
{
if(A[i])
{
A[j] = false;
}
}
}
free(A); // free the memory
return 0;
}
Answer provided by www.AssignmentExpert.com