Recent

Comments

Follow us on Facebook

Monday 1 January 2018

Write a program to pass array as an argument to the function.

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."

Write a program, that takes 16-Elements in Two-Dimensional-Array that has 4 rows & 4 columns, then display the diagonal of Matrix.

Write a program, that takes 16-Elements in Two-Dimensional-Array that has 4 rows & 4 columns, then display the diagonal of Matrix. ...

propeller ads

PropellerAds