Question
What is the output of the following code? Assume all other necessary and relevant C++ code is present in the program, its just not shown
What is the output of the following code? Assume all other necessary and relevant C++ code is present in the program, its just not shown below. Add a comment to every line of code. Hint: make a table of values for jack.
need some help please!
void someFunction( const array< int, 5 > &a, int b );
int main() {
array< int, 5 > jack; for( int x = 0; x < jack.size(); x++ ){
jack[ x ] = 100 / (x+1);
}
someFunction( jack, 0 );
return 0; }
void someFunction( const array< int, 5 > &a, int current ) {
if( b < a.size() ){ cout << a[ current ] << ;
} }
someFunction( a, current+1 );
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started