Which is the correct two-dimensional array declaration? With the statement: int grades[2][4]; int values[10] = {1, 2, 3, 4, 5}; int grades[2][4]; printf("%d", values[6]); int grades[11]; What is the output? int grades[2][4]; runtime error
Added by Consuelo C.
Step 1
int[2Jl4) grades: This is not a valid declaration. It should be int grades[2][4]. Show more…
Show all steps
Your feedback will help us improve your experience
Narayan Hari and 99 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
'Which of the following correctly declares an array? int arr; int arr[array size]; array{array size}; array arr[array size];'
Rakesh S.
What will be the output of the following statements? int i = 1, j; j = i-- - -2; printf("%d", j);
Madhur L.
With the statement: int grades[5] = {70, 80, 90, 100, 50}; What does the statement print for the array element grades[2]? print("%d", grades[2]); What does the statement print for the array element grades[4]? print("%d", grades[4]);
Paul G.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD