Write a program to pass array as an argument to the function.
#include<iostream>
using namespace std;
void display (int marks [5]);
int main()
{
int marks[5]={88,34,54,45,32};
display (marks);
return 0;
}
void display (int m[5])
{
cout<<"displaying marks "<<endl;
for (int i=0;i<5;++i)
{
cout<<"student"<<i+1<<" "<<m[i]<<endl;
}
}
0 on: "Write a program to pass array as an argument to the function."