Which of the following statement(s) is/are correct ?
int num[7];
num[7]=8;
Answers
Answered by
0
Answer:
int num[7]
Explanation:
CORRECT ANSWER
Answered by
0
int num [7] is correct
Explanation:
from the above statements
int num [7] is correct
it is required to specify the type of the data
when we are declaring array has some num[5],that means it has the limit to has the 5 elements...
those are num[0],num[1],num[2],num[3],num[4] ...num[6]
in this first one we have to answer like "5" the lenght of that array...
In second one num[5] in not a region of that array.
so compiler thinks that it is an error and it is raising an exception that Array index out of Bound error
#Learn more:
What is the answer for the following
for(int num=0;ctr=5;num num++;
https://brainly.in/question/7362119
Similar questions