Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Program of User define function with array in  C++ (C Plus Plus, CPP)  and C with flowchart

Program of User define a function with an array in  C++ (C Plus Plus, CPP)  and C with the flowchart

In this tutorial, we will learn about the followings;

  1. Flowchart of User define a function with an array 
  2. Program of User define a function with the array in  C++ (C Plus Plus, CPP)
  3. Program of User define the function with an array in  C

Flowchart of User define a function with an array 

Coming Soon.

Program of User define a function with an array in  C++ (C Plus Plus, CPP)

#include<iostream>
using namespace std;

void pass(int[],int);
int main()
{
int p[9]={1,2,3,4,5,6,7,8,9};

pass(p,9);
return 0;
}
void pass(int x[],int c)
{
for(int j=0;j<c;j++)
{
cout<<x[j]<<"\n";
}
}

Output

Program of User define function with array in  C++ (C Plus Plus, CPP)  and C with flowchart

Figure: Program of User define a function with the array in  C++ (C Plus Plus, CPP)  and C with the flowchart.

Program of User define a function with an array in  C

#include<stdio.h>
#include<conio.h>
using namespace std;

void pass(int[],int);
int main()
{
int p[9]={1,2,3,4,5,6,7,8,9};

pass(p,9);
getch();
return 0;
}
void pass(int x[],int c)
{
for(int j=0;j<c;j++)
{

printf(" %d \n" ,x[j]);
}
}

Output

Program of User define function with array in  C++ (C Plus Plus, CPP)  and C with flowchart

Figure: Program of User define the function with an array in  C++ (C Plus Plus, CPP)  and C with a flowchart.