Array with functions

closed account (1CohAqkS)
how to create a function that will print array.....
Last edited on by admin
closed account (1CohAqkS)
#include <iostream>

int main()
{
const int No_of_marks = 14;
int marks[No_of_marks] = {68, 72, 78, 69, 85, 95, 75, 77, 82, 84, 91, 89, 95, 74};

for (int i =0; i < No_of_marks; ++i)
{
std::cout << "Mark " << i << " = " << marks[i] << std::endl;
}

return 0;
}
closed account (1CohAqkS)
i need to create a function that will print the above declared variables.......plz help!!!!!!!!!!!!!!!!!!!
closed account (1CohAqkS)
jst want to knw how to create a function that will print array............
closed account (z05DSL3A)
First, stop posting in the Articles forum.
Second, Give people some time to respond before begging for help again
Third, look at the threads that you have already had answers to, they clearly show how to pass arrays into functions.

edit:
Requested move to beginners forum.
Last edited on
check your email.
Topic archived. No new replies allowed.