Suppose list is an array of siz components of type int. What is stored in list after the following C++ code executes?

saqib Sep 20

620 3 Replies
c++  

list[0]=5;
for(int i=1; i<6;i++)
{
list[i]=i*i+5;
if(i>2)
list[i]=2*list[i]-list[i-1];
}

Answers

Read more : https://www.chegg.com/homework-help/lab-manual-for-malik-s-c-programming-from-problem-analysis-to-program-design-5th-edition-chapter-9-solutions-9780538798105
Saud Ashfaq 22, Sep 20
1 i=0 : list[0]=5 i=1 : list[1]=7 i=2 : list[2]=6 i=3 : list[3]=11 i=4 : list[4]=10 answer 2: i=0 : list[0]=5...
Saud Ashfaq 22, Sep 20
for (j = 0; j < 5; ++j)
System.out.println(list[j]);

neelimark :
so this will print the list values

Customer:
So is the answer
2
7
6
11
10

Customer:
or is is









for (j = 0; j < 5; ++j)
System.out.println(list[j]);
Saud Ashfaq 22, Sep 20