Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
+1 vote
365 views
in Arrays and Structures by (49.1k points)
closed by

Write about initialization of 2 – D array.

1 Answer

+1 vote
by (54.8k points)
selected by
 
Best answer

The array can be initialized in more than one way at the time of 2-D array declaration.

For example

int matrix[4][3] = {

{10,20,30},// Initializes row 0 

{40,50,60},// Initializes row 1 

{70,80,90},// Initializes row 2 

{100,110,120}// Initializes row 3

};

int matrix[4][3] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120};

Array’s row size is optional but column size is compulsory.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

...