In 2D array, assigning direct string to char array, getting an error.
name = "hello";
Because, an array type is not a modifiable lvalue, hence cannot be "assigned".
An assignment operator needs a modifiable lvalue as the LHS operand.
C11, chapter §6.5.16
An assignment operator shall have a modifiable lvalue as its left operand.
and, chapter §22.214.171.124
[....] A modifiable lvalue is an lvalue that does not have array type, does not have an incomplete type, does not have a constqualified type, and if it is a structure or union, does not have any member (including, recursively, any member or element of all contained aggregates or unions) with a constqualified type.
In your case, for an array defined like
name is of type
char , that is, an array of 10