134k views
0 votes
The statement

int grades[ ] = { 100, 90, 99, 80};

shows an example of:
a) Implicit array sizing
b) Declaring a function.
c) Using a conditional statement.
d) Declaring a variable.

User Amir Eldor
by
8.5k points

1 Answer

3 votes

Final answer:

The statement 'int grades[] = { 100, 90, 99, 80}' exemplifies implicit array sizing in programming, where the array size is determined by the compiler based on the provided elements.

Step-by-step explanation:

The statement int grades[] = { 100, 90, 99, 80} shows an example of implicit array sizing. This is because the array size is not explicitly specified, but it is inferred from the number of elements within the braces. In C and C++ programming languages, when you initialize an array without specifying the number of elements, the compiler counts the elements that are provided between the braces and creates an array of that size.

User Mizanur
by
8.3k points