Give the statements for initializing the following a) Two dimensional integer array of size 3 x 2 b) Two dimensional character array of 5 rows
Answers
Answered by
2
Answer:
Two – dimensional Array (2D-Array)
Declaration – Syntax: data_type[][] array_name = new data_type[x][y]; For example: int[][] arr = new int[10][20];
Initialization – Syntax: array_name[row_index][column_index] = value; For example: arr[0][0] = 1;
Similar questions
Science,
11 days ago
Environmental Sciences,
11 days ago
Political Science,
23 days ago
Math,
23 days ago
Hindi,
8 months ago