Question: What is output? void doTheThing ( int a [ ] , int len ) { for ( int i = 1 ; i len; i

What is output?
void doTheThing(int a [], int len)
{
for (int i=1; i len; i++)
a[i]=a[i]%6;
}
//** back in the main function
int arr[]={10,20,30,40,50,60};
int len =6;
doTheThing(arr,len);
cout arr[1] arr[len-1];
a)40
b)20
c)1050
What is output? void doTheThing ( int a [ ] , int

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!