Govt. Exams
Entrance Exams
Advertisement
Topics in C Programming
Consider a 2D array int matrix[3][3]. If we access matrix as a 1D array, how many total elements can we access?
Correct Answer:
C. 9
EXPLANATION
2D array is stored contiguously in memory. 3x3 array has 9 elements total, accessible as a 1D array of 9 elements.