use of pointer in multidimensional array
arr[i][j] = *(ptr + (i x no_of_cols + j))
use of pointer in multidimensional array
arr[i][j] = *(ptr + (i x no_of_cols + j))
matrix pointer c
/*any type*/ array2d[nRows][nCol];
// normal 2D array accessing
array2d[iRow][jCol] = value1;
bool b = array2d[iRow][jCol] == value1;
// accessing 2D array with pointers
*(*(array2d + iRow) + jCol) = value2;
b = *(*(array2d + iRow) + jCol) == value2;
use of pointer in multidimensional array
arr[i][j] = baseAddress + [(i x no_of_cols + j) x size_of_data_type]
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us