E
E
Evdokim2021-12-02 23:35:42
C++ / C#
Evdokim, 2021-12-02 23:35:42

How to determine the size of a two-dimensional array in C?

Let's say I have an array: How to determine the size of the first level? To output in this case 3.
int arr[][2] = { {1,2}, {3,4}, {5,6} };

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wisgest, 2021-12-02
@novelette

sizeof arr / sizeof arr[0]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question