First and foremost, you should check the datatypes for the operands of the assignment operators.
On the LHS, you have a
char, and you're trying to assign a
char * (RHS) to it. This is type mismatch, hence not possible.
a being a two-dimensional array, you cannot even assign to
a either, as arrays (not array elements) are not assignable.
You have to copy the string literal into the memory, however, you have to do something like
So, to answer,
....but it can be assigned using string function?
Well, there's a difference between assignment using assignment operator and copying using the string-family library function. They don't behave the same way. Assignment using assignment operator to an array is not possible, as it needs a modifiable lvalue as the left operand, and an array (name) is not a modifiable lvalue.