Practice Two-dimensional Arrays - 1.6 | Chapter 10: Arrays and Strings | ICSE Class 12 Computer Science
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

What is the declaration for a two-dimensional array with 3 rows and 4 columns?

💡 Hint: Think of the format data_type array_name[num_rows][num_columns];

Question 2

Easy

How would you access the first element in a 2D array called 'data'?

💡 Hint: Remember, array indexing starts at 0.

Practice 4 more questions and get performance evaluation

Interactive Quizzes

Engage in quick quizzes to reinforce what you've learned and check your comprehension.

Question 1

What will int matrix[2][3] = {{1, 2, 3}, {4, 5, 6}}; do?

  • Declare a 2D array
  • Initialize it with values
  • Both A and B

💡 Hint: Consider both declaration and initialization parts.

Question 2

Can a two-dimensional array be accessed in a single index?

  • True
  • False

💡 Hint: Think about how index locations work in arrays.

Solve 1 more question and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Write a C++ program that calculates the average of all elements in a 3x3 matrix.

💡 Hint: Don’t forget to initialize your sum variable at 0!

Question 2

Create a program that takes two 2D arrays, multiplies them, and outputs the resulting matrix.

💡 Hint: Ensure to remember the logic that only certain dimensions can be multiplied together.

Challenge and get performance evaluation