1.

Write a C++ program to illustrate array traversal.

Answer»

#include<iostream>

using namespace std; 

int main() 

int i, mark[50]; 

for(i=0;i<50; i++) 

cout<<“Enter mark “<<i + 1<<";

cirt>>mark[i];

cout<<“\nThe mark of 50 students after adding bonus mark 10 is given below \n”; 

for(i=0;i<50; i++)

cout<<mark[i] + 10<<endl; 

}



Discussion

No Comment Found

Related InterviewSolutions