C How to create an 2d array of characters?

So would like to create an 2D array of characters for testing purposes. Here is my code. const int rows = 4; const int columns = 6; //char field[rows][columns]; //fill_field(rows,columns,field); char field[rows][columns] = { "A BCD ", "B CDA ", "C DAB ", "D ABC " }; I’m getting error saying "variable-sized object may not… Read More C How to create an 2d array of characters?

Why is this C array giving the "Expected Expression" error?

learning the C programming language and reading the documentation with Xcode 13.2 open and a Command-Line Tool project in front of me. Reading this, in the Declarations/Arrays/Variable Length Arrays section: { int n = 1; label: int a[n]; // re-allocated 10 times, each with a different size printf("The array has %zu elements\n", sizeof a /… Read More Why is this C array giving the "Expected Expression" error?