Help me out with this code

@Namanjain123
Declare a as a character array rather than a pointer to char.

But why as pointer is second side of array only
A pointer can always be converted to array

@Namanjain123
An array can be converted to a pointer however it doesn’t work the other way around. You need to allocate dynamic memory to a pointer only then can it behave like an array.