About 329,000 results
Open links in new tab
  1. How to implement a 2-dimensional array of struct in C

    Jul 18, 2010 · I'm currently trying to understand how to implement a 2-dimensional array of struct in C. My code is crashing all the time and I'm really about to let it end like all my approaches …

  2. c - How are multi-dimensional arrays formatted in memory

    A static two-dimensional array looks like an array of arrays - it's just laid out contiguously in memory. Arrays are not the same thing as pointers, but because you can often use them …

  3. Pointer to 2D arrays in C - Stack Overflow

    In your second example, you explicitly create a pointer to a 2D array: int (*pointer)[100][280]; pointer = &tab1; The semantics are clearer here: *pointer is a 2D array, so you need to access …

  4. Indexing multidimensional arrays in C - Stack Overflow

    Note that for this to work the type of original needs to be SOMETHING * -- not a 2D array of SOMETHING. Otherwise the pointer arithmetic increments by rows instead of SOMETHING s, …

  5. 2D array initialisation in C - Stack Overflow

    Sep 27, 2016 · Apart from the question of arcane C magic, which somehow I have never learnt despite over a decade of C programming : (, I would like to know how to generate my array so …

  6. Typedef for 2 dimensional array in C - Stack Overflow

    Jul 21, 2013 · Is there a way to typedef a 2 dimensional array in C? Something like: typedef char[10][10] board; This example doesn't compile. Is there any way to do it? Or any other …

  7. correct way to return two dimensional array from a function c

    Out of interest, why do you want to return a 2D array from a function? There could be a good reason to want to do it, but it is quite possibly not the way to go...

  8. c - How to assign value in 2 Dimensional array - Stack Overflow

    Nov 16, 2017 · How to assign value in 2 Dimensional array Asked 7 years, 11 months ago Modified 7 years, 11 months ago Viewed 10k times

  9. c - Calloc a Two-Dimensional Array - Stack Overflow

    May 1, 2015 · To build a array 2D array in memory is like this => So it can be accessed using such a formula *(own + rows*y +x) Using this type of array is very simple and open, for …

  10. What is the best way to make 2 dimensional array in C

    Apr 27, 2020 · Here a one-dimensional array with the element type int * is created. And then each element of the one-dimensional array in turn points to an allocated one dimensional array with …