Skip to main content
added 7 characters in body
Source Link
Mad Physicist
  • 115.7k
  • 29
  • 201
  • 291

I am reading the book, "Programming in C" by Kochen and I am confused where he explains the initialization of multidimensional array here.

here

In particular, I don't understand the meaning of the following sentence Note that, in this case, the inner pairs of braces are required to force the correct initialization. Without them, the first two rows and the first two elements of the 3rd row would have been initialized instead. I'm not sure what the heck the sentence means.

I am reading the book, "Programming in C" by Kochen and I am confused where he explains the initialization of multidimensional array here. In particular, I don't understand the meaning of the following sentence Note that, in this case, the inner pairs of braces are required to force the correct initialization. Without them, the first two rows and the first two elements of the 3rd row would have been initialized instead. I'm not sure what the heck the sentence means.

I am reading the book, "Programming in C" by Kochen and I am confused where he explains the initialization of multidimensional array

here

In particular, I don't understand the meaning of the following sentence Note that, in this case, the inner pairs of braces are required to force the correct initialization. Without them, the first two rows and the first two elements of the 3rd row would have been initialized instead. I'm not sure what the heck the sentence means.

Source Link
user2635911
  • 502
  • 2
  • 6
  • 19

Multidimensional array initialization in C

I am reading the book, "Programming in C" by Kochen and I am confused where he explains the initialization of multidimensional array here. In particular, I don't understand the meaning of the following sentence Note that, in this case, the inner pairs of braces are required to force the correct initialization. Without them, the first two rows and the first two elements of the 3rd row would have been initialized instead. I'm not sure what the heck the sentence means.