C++ Programming Code Examples C++ > Arrays and Matrices Code Examples C++ Program to Pass Array in Function C++ Program to Pass Array in Function In below program we pass array in function as an arguments and finally print all elements of an array. #include<iostream.h> #include<conio.h> void pass(int[],int); void main() { int a[]={3,6,9,12,5}; clrscr(); pass(a,5); getch(); } void pass(int b[],int n) { int x; for(x=0;x<n;x++) { cout<<"/n"<<b[x]; } }