Back To C++ Single Dimensional Arrays Index
//program to input an int array and pass this array to function #include
#include
void printarray(int a[10]) { int i; printf("\nprinting the array\n"); for(i=0;i<10;i++) { printf("%d\n",a[i]); } } void main() { int a[10]; int i; clrscr(); printf("\nenter the elements of integer array\n"); for(i=0;i<10;i++) { printf("\nenter element at position %d : ",i); scanf("%d",&a[i]); } printarray(a); getch(); }