#include<stdio.h>
int main(){
char array[3][3]={{'2','1','3'},{'4','5','9'}};
array[0][0]='51';
}
Error warning: multi-character character constant [-Wmultichar] array[0][0]='51'; ^~~~ 17.4.c:6:17: warning: overflow in implicit constant conversion [-Woverflow]
Char can only hold one symbol. '51' is two symbols. It could be three if you would write it between double brackets ("51") because C-type strings are always finished with
\0. To hold more than one symbol you should use char pointers and double brackets or access them differently using one dimension:The second line tells that 3 string containing at most 7 characters (including
\0) can be used. I've chose such a number because "three" consists of 6 symbols.