Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi-dimensional arrays in C
#1
Multi-dimensional arrays are arrays of arrays.

int matrix[3][3] = {
    {1, 2, 3},
    {4, 5, 6},
    {7, 8, 9}
};
printf("%d\n", matrix[1][2]); // Output: 6
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using multi-line comments for explanations in C Qomplainerz 0 342 07-26-2023, 07:28 AM
Last Post: Qomplainerz
  Nested multi-line comments in C Qomplainerz 0 264 07-26-2023, 07:27 AM
Last Post: Qomplainerz
  Multi-Line comment within code in C Qomplainerz 0 264 07-26-2023, 07:26 AM
Last Post: Qomplainerz
  Multi-line comments in C Qomplainerz 0 335 07-26-2023, 07:24 AM
Last Post: Qomplainerz
  Declaring and initializing arrays Qomplainerz 0 329 07-25-2023, 11:39 AM
Last Post: Qomplainerz
  Multi Line Comments in C 18 Qomplainerz 0 815 04-06-2022, 02:24 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 7 Guest(s)