here is an example of Function that could get data from other function... hope this would help...
the program would allow the user to delete a number from the displayed array...
#include<stdio.h>
main()
{
int del(int *a, int value, int *size);
static int array[] = {11,12,13,14,15,16,17,18,19,20};
int num, i=10, c, found;
char exit;
do
{
clrscr();
printf("Original Array of Numbers\n");
for(c = 0; c < i ; ++c)
printf("%3d", array[c]);
printf("\n\nEnter a data to be deleted: ");
scanf("%d", &num);
c = i;
found = del(array, num, &i);
if(found == 1)
{
printf("\n%d is deleted from the array\n", num);
for(c=0; c<i; ++c)
printf("%3d", array[c]);
}
else
printf("Data not found");
printf("\nDo you want to delete another number(Y/N)?");
exit = getch();
}while(exit != 'n' && exit !='N');
}
int del(int *a, int value, int *size)
{
int i, c;
for(i = 0; i<*size; ++i)
{
if(a==value)
{
for(c = i; c<=*size-1; ++c)
a[c] = a[c+1];
*size = c-1;
return(1);
}
}
}