You can't return arrays.

Nor can you print a whole array using printf.

Nor is an array inherently aware of it's capacity.

Code:

#include <stdio.h>
void test_armstrong(int number, int *array, int *nResults)
{
int a[4], sum,i, j, temp;
temp = number;
a[3] = number/1000;
number = number - (a[3]*1000);
a[2] = number/100;
number = number - (a[2]*100);
a[1] = number/10;
number = number - (a[1]*10);
a[0] = number;
sum = 0;
for (i = 0; i < 4 ; i++)
{
a[i] = a[i]*a[i]*a[i]*a[i];
sum = sum + a[i];
}
if (sum == temp)
{
array[*nResults] = temp;
printf("Armstrong number %d\n", array[*nResults]);
(array[*nResults])++;
}
}
int main()
{
int i, j, number, start, end;
int array[20] = {0}; // how many?
int nResults = 0;
start = 1000;
end = 9999;
for( i = start; i <= end; i++)
{
number = i;
test_armstrong(number, array, &nResults);
}
printf("\n\n%d\n", nResults);
// a for loop is left as an exercise to the reader.
return 0; // so you don't see something silly like return 7
}