C & C++ Programming
Computer ScienceChapter 5 — Arrays and Strings
Lesson 5.3 : Two-Dimensional Arrays
Reading & Interactive Lesson
Two-Dimensional Arrays
Reading Material & Notes
Two-Dimensional Arrays
A two-dimensional array represents data in rows and columns.
int matrix[2][3] =
{
{1, 2, 3},
{4, 5, 6}
};
Nested Loop
for(int i = 0; i < 2; i++)
{
for(int j = 0; j < 3; j++)
{
printf("%d ", matrix[i][j]);
}
}
Course Curriculum
10 Chapters • 50 Lessons
Chapter 1 — Introduction to C and C++
5 Lessons
Chapter 2 — Variables, Data Types and Operators
5 Lessons
Chapter 3 — Conditional Statements and Loops
5 Lessons
Chapter 4 — Functions and Modular Programming
5 Lessons
Chapter 5 — Arrays and Strings
5 Lessons
Chapter 6 — Pointers and References
5 Lessons
Chapter 7 — Structures, Unions and Enumerations
5 Lessons
Chapter 8 — Object-Oriented Programming in C++
5 Lessons
Chapter 9 — Inheritance, Polymorphism and Templates
5 Lessons
Chapter 10 — File Handling and Mini Projects
5 Lessons