I have declared an array char **arr; How to initialize the memory for the 2D char array.
Use the following trick:
typedef char char2D[1][1]; char2D *ptr; ptr = malloc(rows * columns, sizeof(char)); for(i = 0; i < rows; i++) for(j = 0; j < columns; j++) (*ptr)[i][j] = char_value;