Question: consider the following array declaration int sales [ 5 ] = { 1 0 0 0 0 , 1 2 0 0 0 , 9

consider the following array declaration
int sales[5]={10000,12000,900,500,20000};
which of the following it-statement verifies that the array subscript stored in the variable is valid for the scalesarrayy?
a, if(x>=0&&x<4)
b if(x>=0&&x<=4)
c if (sales[x]>=0&&sales[x]<4)
d if(sales[x]>=0&&sales[x]<=4)

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!