May 23, 2011 at 9:15am UTC
how to create a function that will print array.....
Last edited on May 24, 2011 at 9:22am UTC by admin
May 23, 2011 at 9:24am UTC
#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;
}
May 23, 2011 at 9:25am UTC
i need to create a function that will print the above declared variables.......plz help!!!!!!!!!!!!!!!!!!!
May 23, 2011 at 9:30am UTC
jst want to knw how to create a function that will print array............
May 23, 2011 at 9:50am UTC
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 May 23, 2011 at 9:52am UTC