113k views
4 votes
What is the minimum valid subscript value for array a?

#define MAX 50
int a[MAX], i, j, temp;
A. 0
B. 1
C. Any negative number
D. There is no minimum
E. None of the above

User Karoid
by
8.4k points

1 Answer

5 votes

Answer:

The answer to this question is A. 0.

Step-by-step explanation:

In this segment of code #define MAX 50 is used.It is a pre-processor directive and in pre processor directive it is a MACRO means whenever the compiler encounters the word MAX in the execution it replaces MAX with 50.

So the size of the array becomes 50 and the indexing starts from 0 and upto 49.

User Scott Davidson
by
8.2k points