Nevermind here is the solution for all glad I helped myself, with some help from someone.
Part A
Code:
#include <stdio.h>
#define nums 7
void display(int *);
int main()
{
int channels[nums]={2,4,5,7,9,11,13};
printf("Channels:");
display(channels);
}
void display(int *channels)
{
int i;
for(i=0;i<nums;i++)
{
printf("%5d",*(channels+i));
}
}
Part B
Code:
#include <stdio.h>
#define nums 7
void display(int *);
int main()
{
int channels[nums]={2,4,5,7,9,11,13};
printf("Channels:");
display(channels);
}
void display(int *channels)
{
int i;
for(i=0;i<nums;i++)
{
printf("%5d",*channels);
*channels++;
}
}