Programming - Arrays - Discussion

You Are Here :: Home > C++ Language > Arrays - Discussion

 



Q.

Given the declaration
int gamma[50];
int j;
Which of the following for loop sets the index of gamma out of bound?
(i)
for(j = 0; j <= 49; j++)
cout<(ii)
for(j = 1; j < 50; j++)
cout<(iii)
for(j = 0; j <= 50; j++)
cout<                        


A. Only (i) B. Only (ii)
C. Only (iii) D. All (i), (ii), and (iii)

Answer: Option C
Explaination:

 


No Explanation




Discussion

Your Comments Goes here...
NameDiscussion