C Program Passing Array Elements to a function

#include<stdio.h>
#include<conio.h>
void scanfcode(int);
void main()
{
int i;
int num[]={100,110,120,130,140,150};
clrscr();
for(i=0;i<6;i++)
 {
  scanfcode(num[i]);
 }
 getch();
}
void scanfcode(int x)
{
   printf("%d\n",x);
}

OUTPUT:-

array

Leave a Reply

Your email address will not be published. Required fields are marked *