Question: 1 . ( a ) What is wrong with the following function? ( b ) Modify to make it print numbers from 1 0 0

1.(a) What is wrong with the following function?
(b) Modify to make it print numbers from 100 to 109 if the value for size is 10. void printArray (int const list [l, int size)(for
(int i =0; i < size; i++)
( list (i]= i;
cout list (i]",";
(2 marks)
(3 marks)
Part - Program Output Tracing
What is the output for the following
array (31(3)(3)
| double prices (21(21
11.2
CONT
Required Output:
100,101,102,103,104,105,106,107,108,109

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!