Small problem with printing elements of an array
OK I'm horrible at this so bear with me. The user is supposed to enter a bunch of numbers that get stored in an array. Then it uses a function to print the elements of the array. I don't knwo how to set up the function parameters or whatever to get it to work but i'm pretty sure it should work other than that. Here's what I've got:
Code:
#include <stdio.h>
void printset(int [], int);
int main()
{
int i = 0, a[25] = {0};
printf("elements in array are:\n");
for(i=0;i<25;i++)
{
scanf("%d",&a[i]);
}
printset();
return 0;
}
void printset(int b[25], int i)
{int i;
for (i=0;i<25;i++)
{
printf("{%d, ",b[i]);
printf(" }\n");
}
}