There error occuring while compiling why?

hi @guptanikhil898 you are trying to pass a string as a character array and that will not work. https://ide.codingblocks.com/s/246210 I have corrected your code here.
The way to initialise a character array is {‘a’,‘p’,‘p’} like a normal array. (I know that assigning a string works too, but character arrays can be unpredictable at times, and its better to use the string datatype anyway)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.