Home »
Code Examples »
C Code Examples
C - Map a 2D array onto a 1D array Code Example
The code for Map a 2D array onto a 1D array
int arr[width * height];
int Map2DArrayOnTo1DArray(int row, int col, int element)
{
arr[width * row + col] = element;
}
Code by IncludeHelp,
on August 23, 2022 10:00